我已经使用SSH启用了Ubuntu 14.04服务器,禁用root登录基于认证SSH密钥并能成功使用基于身份验证与我的用户帐户的SSH密钥连接blahblah我的Mac SSH客户端上。
但是,为了测试使用密码身份验证的SSH登录,我在Filezilla中为用户帐户blahblah使用了SFTP登录及其密码,它使我无需任何基于SSH密钥的身份登录即可登录。
该/etc/ssh/sshd_config
文件是如下。如您所见,我已禁用PasswordAuthentication
。sudo service ssh restart
修改此配置文件后,我已经通过使用重新启动了sshd守护程序。有什么想法可能会发生这种情况吗?
Port 8888
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM no
AllowUsers blahblah
通过查看/var/log/auth.log,可以验证Mac客户端上的Filezilla实际上似乎正在使用Mac SSH代理而不是在此输入的密码。
尝试通过并通过另一台计算机上的SFTP失败而验证了SFTP正在使用SSH密钥身份验证。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句