171
165

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWSの初期設定でrootパスワードを設定する

Last updated at Posted at 2014-08-04

AWSで新規インスタンスを作成した場合、初期設定ではrootのパスワードが設定されていません。
このままだとリモートからrootログインできないため、ec2-userでリモートログイン後にrootのパスワードを設定します。

・ec2-userでリモートログイン
ssh -i mykey.pem ec2-user@[Public IP]

・rootユーザに昇格
[ec2-user@ip-***-***-***-*** ~]$ sudo su -

・パスワード変更
[ec2-user@ip-***-***-***-*** ~]$ passwd Changing password for user root. New password: (パスワード入力) Retype new password: (もう一度入力) passwd: all authentication tokens updated successfully. [root@ip-***-***-***-*** ~]#

できました :tada:

171
165
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
171
165

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?