軽くメモ。
サーバ側
/etc/ssh/sshd_config 設定
PasswordAuthentication を yes にすることにより、パスワード認証を許可する。
PasswordAuthentication yes
昔はここの設定のデフォルトが yes になっていることが多かったので特に設定を変更する必要はなかったが、最近はここのデフォルトが no になっていることも多くなっており、そういう環境ではあえて設定を編集して yes にしないとパスワード認証ができなかったりする。
ユーザ追加・パスワード設定
# useradd ユーザ名 # passwd ユーザ名 Changing password for user ユーザ名. New password: Retype new password: passwd: all authentication tokens updated successfully.
クライアント側
接続
$ ssh ユーザ名@ホスト名 The authenticity of host 'xxx' can't be established. RSA key fingerprint is xx:…:xx. Are you sure you want to continue connecting (yes/no)? yes ユーザ名@ホスト名's password: xxxxxx