sshd_conf标准配置--转自阿里云盾
注:把端口改成自己需要设置的端口
Port 22
Protocol 2
SyslogFacility AUTHPRIV
PermitRootLogin no
MaxAuthTries 3
PermitEmptyPasswords no
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
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
X11Forwarding yes
Banner /etc/banner
Subsystem sftp /usr/libexec/openssh/sftp-server
IgnoreRhosts yes
HostbasedAuthentication no
除特别注明外,本站所有文章均为奇妙伞原创,转载请注明出处来自https://qm3.com.cn/post/184.html