LoginSignup
0
0

More than 3 years have passed since last update.

ec2-userをパスワード認証にする

Last updated at Posted at 2019-12-04

公式に書いてある通りではうまくいかず
一味加える必要があったゾ…(PubkeyAuthentication no)

# #ec2-userにパスワードを設定する
# sudo passwd ec2-user

# #sshd_configをちょっといじる必要がある
# sudo vim /etc/ssh/sshd_config
-----------------------------------------------------------
PasswordAuthentication yes  #パスワード認証を有効化
PubkeyAuthentication no     #鍵認証を無効化
-----------------------------------------------------------

# #sshdを再起動しないと有効にならない
# sudo service sshd restart

# #リログして確かめるゾ~
# exit

追記:↑を設定したEC2インスタンスのAMIに問題が…

そのAMIから起動したインスタンスがSSHログイン不能に /(^o^)\

とりあえずAMI化する際には

PubkeyAuthentication yes

に戻さねばという情けない状態…

今度時間あるときに詳しく調査ゾ…

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