ssh 限制 ip 及用户密钥认证登录
cat /etc/ssh/sshd_config | grep -v "#" Port 5222 AllowUsers root@60.174.20 dbs@60.174.2084 db@60.1184 root@36.7.1179 dbs@36.7.132.179 db@36.7.13 root@172.23.170.81 root@172.23.170.80 root@172.23.179 root@localhost HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key PubkeyAuthentication yes AuthorizedKeysFile ~/.ssh/authorized_keys /home/dbs/.ssh/authorized_keys ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE AcceptEnv XMODIFIERS Subsystem sftp /usr/libexec/openssh/sftp-server UseDNS no SyslogFacility AUTHPRIV PermitRootLogin yes PasswordAuthentication no
cat /etc/ssh/sshd_config | grep -v "#"
Port 5222AllowUsers root@60.174.203.184 dbs@60.174.203.184 db@60.174.203.184 root@36.7.132.179 dbs@36.7.132.179 db@36.7.132.179 root@172.23.170.81 root@172.23.170.80 root@172.23.170.79 root@localhost
HostKey /etc/ssh/ssh_host_rsa_keyHostKey /etc/ssh/ssh_host_ecdsa_keyHostKey /etc/ssh/ssh_host_ed25519_key
PubkeyAuthentication yes
AuthorizedKeysFile ~/.ssh/authorized_keys /home/dbs/.ssh/authorized_keys
ChallengeResponseAuthentication no
GSSAPIAuthentication yesGSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGESAcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENTAcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGEAcceptEnv XMODIFIERS
Subsystem sftp /usr/libexec/openssh/sftp-server
UseDNS noSyslogFacility AUTHPRIVPermitRootLogin yesPasswordAuthentication no
浙公网安备 33010602011771号