0
0

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 3 years have passed since last update.

【AWS】EC2,RockyLinux8の初期ユーザ名

Last updated at Posted at 2021-09-29

AWS EC2で作成したRockyLinux8インスタンスへの初回SSH方法

インスタンス作成したはいいもののユーザ名が分からなかったのでメモ

rockyユーザが作成されているのでそれでSSHする

結論から書くと rocky ユーザでログインできる

$ ssh -i aws-ssh-key.pem rocky@54.xxx.xxx.xxx
The authenticity of host '54.xxx.xxx.xxx (54.xxx.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '54.95.165.106' (ECDSA) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Wed Sep 29 05:01:56 2021 from 35.213.38.0
[rocky@ip-192-168-2-106 ~]$ 

試行錯誤

最初、とりあえずec2-user とか root を試した

$ ssh -i imade-aws-key.pem 54.xxx.xxx.xxx
user名@54.xxx.xxx.xxx: Permission denied
  →permissiondenyされる

$ ssh -i imade-aws-key.pem ec2-user@54.xxx.xxx.xxx
ec2-user@54.xxx.xxx.xxx: Permission denied
  →permissiondenyされる

$ ssh -i imade-aws-key.pem root@54.xxx.xxx.xxx
Please login as the user "rocky" rather than the user "root".
  →固まった後、勝手にログアウトされる

rootでログインしようとしたときにrockyでログインしてね!っていうメッセージがでたのでわかった

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?