[root@centos ~]# vi /etc/ssh/sshd_config ← SSHサーバー設定ファイル編集
#Protocol 2,1
↓
Protocol 2 ← SSH2でのみ接続を許可
#SyslogFacility AUTH
↓
SyslogFacility AUTHPRIV ← ログを/var/log/secureに記録する※CentOSデフォルトに合わせる
#PermitRootLogin yes
↓
PermitRootLogin no ← rootでのログインを禁止
#PasswordAuthentication yes
↓
PasswordAuthentication no ← パスワードでのログインを禁止(鍵方式によるログインのみ許可)
#PermitEmptyPasswords no
↓
PermitEmptyPasswords no ← パスワードなしでのログインを禁止
[root@centos ~]# echo Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com >> /etc/ssh/sshd_config ← 弱い暗号方式を使用しないようにする
[root@centos ~]# echo Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com >> /etc/ssh/ssh_config ← 弱い暗号方式を使用しないようにする
[root@centos ~]# echo MACs hmac-sha2-256,hmac-sha2-512,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com >> /etc/ssh/sshd_config ← 弱い暗号方式を使用しないようにする
[root@centos ~]# echo MACs hmac-sha2-256,hmac-sha2-512,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com >> /etc/ssh/ssh_config ← 弱い暗号方式を使用しないようにする
|
|