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 update
