LoginSignup
166
163

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:

166
163
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
166
163