sshd

公開鍵認証のみでrootログインを不可にする

  1. 一般ユーザーを作る
  2. 一般ユーザーのauthorize_keysに公開鍵を登録
  3. authorize_keysのパーミッションは600
  4. rootパスワード変更
  5. sshd_config
  6. 疎通確認

sshd_configの変更内容は、

# diff sshd_config_org sshd_config
42c42
< #PermitRootLogin yes
---
> PermitRootLogin no
64c64
< #PasswordAuthentication yes
---
> PasswordAuthentication no
66c66
< PasswordAuthentication yes
---
> #PasswordAuthentication yes