
パスワード接続の禁止設定
sshd_configを編集する
$ sudo vim /etc/ssh/sshd_config
「/」を入力し、次にPasswordAuthenticationを入力し検索する。
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
.
.
.
etc…
「i」キー で-INSERT-モードになり編集する。
先頭の「#」を削除しyesをnoに変更する。
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
.
.
.
etc…
「Esc」キーで-INSERT-モードを終了し「:wq」で保存し終了する。
設定を反映するために再起動する
$ sudo systemctl restart sshd.service
参照元情報