sshd_config の設定変更
以前の記事 で挙げていた項目の中でも出来るだけ早めにやっておきたいこと
特にパスワード認証は早めに無効化しておきたい
手順
/etc/ssh/sshd_config
ファイルの編集をする
$ sudo vi /etc/ssh/sshd_config
今回設定の変更を行うのは後述の2点
パスワード認証の無効化
# 変更前 PasswordAuthentication yes # 変更後 PasswordAuthentication no
rootユーザーのssh接続を無効化
# 変更前 PermitRootLogin yes # 変更後 PermitRootLogin no