- ポート番号を変更する。
Port <ポート番号>
- SSH1プロトコルを禁止する。
Protocol 2
- rootログインを禁止する。
PermitRootLogin no
- パスワード認証・キーボードインタラクティブ認証を禁止し、公開鍵認証を許可する。
PasswordAuthentication no
KeyboardInteractiveAuthentication no
PubkeyAuthentication yes
- ログインできるユーザを制限する。
AllowUsers <ユーザ名> <ユーザ名>・・・
AllowGroups <グループ名> <グループ名>・・・