#PubkeyAuthentication yes #用来设置是否开启公钥验证,如果使用公钥验证的方式登录时,则设置为yes AuthorizedKeysFile .ssh/authorized_keys #设置公钥验证文件地址 #AuthorizedPrincipalsFile none #AuthorizedKeysCommand none #AuthorizedKeysCommandUser nobody #HostbasedAuthentication no #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes #验证的时候是否使用这两个文件 # To disable tunneled clear text passwords, change to no here! #PasswordAuthentication yes #用来设置是否开启密码验证机制,如果用密码登录系统,则设置yes #PermitEmptyPasswords no #是否密码为空的用户可以登录 # Change to no to disable s/key passwords ChallengeResponseAuthentication no #是否允许质疑-应答(challenge-response)认证
# Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no #KerberosUseKuserok yes # GSSAPI options GSSAPIAuthentication yes GSSAPICleanupCredentials no #GSSAPIStrictAcceptorCheck yes #GSSAPIKeyExchange no #GSSAPIEnablek5users no UsePAM yes #设置是否通过PAM验证
#AllowAgentForwarding yes #AllowTcpForwarding yes #置是否允许允许tcp端口转发,保护其他的tcp连接 #GatewayPorts no #设置是否允许远程客户端使用本地主机的端口转发功能,出于安全考虑,建议禁止 X11Forwarding yes #用来设置是否允许X11转发 #X11DisplayOffset 10 #指定X11 转发的第一个可用的显示区(display)数字。默认值是 10 #X11UseLocalhost yes #PermitTTY yes #PrintMotd yes #用来设置sshd是否在用户登录时显示“/etc/motd”中的信息,可以选在在“/etc/motd”中加入警告的信息 #PrintLastLog yes #是否显示上次登录信息 #TCPKeepAlive yes #是否持续连接,设置yes可以防止死连接 #UseLogin no #设置是否在交互式会话的登录过程中使用。默认值是"no" #UsePrivilegeSeparation sandbox #设置使用者的权限 #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #ShowPatchLevel no #UseDNS yes #是否使用dns反向解析,验证IP #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none #VersionAddendum none # no default banner path #Banner none # Accept locale-related environment variables 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 # override default of no subsystems Subsystem sftp /usr/libexec/openssh/sftp-server