0
1

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インスタンスにキーペアの代わりにパスワードログインを有効にする方法

Last updated at Posted at 2020-05-06

【1】パスワードの設定

ec2-user、rootユーザーのパスワード変更
sudo passwd ec2-user
Changing password for user ec2-user.
New password:
Retype new password:

sudo passwd root
Changing password for user root.
New password: 
Retype new password: 

【2】パスワードログインの有効化

以下の通り、/etc/ssh/sshd_configの以下パラメータを変更。

/etc/ssh/sshd_config
PasswordAuthentication yes

【3】設定反映

以下コマンドで設定反映。

sudo service sshd restart

【4】AMIイメージで設定を残す場合

以下の通り、/etc/cloud/cloud.cfgの以下パラメータを変更。

/etc/cloud/cloud.cfg
ssh_pwauth: 1

以上

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?