我已经调整了我的 sshd_config 文件,其中更改了以下值:
此外,我已经通过执行重新启动sshd服务:sudo service ssh restart
。我也重新启动了。
我仍然可以使用用户密码登录。知道我错过了什么吗?
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime …
Run Code Online (Sandbox Code Playgroud)