我有这个线程中描述的完全相同的问题,但是那里接受的答案对我来说不是正确的,因为用户的主目录是本地的。
我认为我在客户端(Windows 7、PuTTY 的 PAGEANT、PUTTYGEN 和 PLINK)正确配置了所有内容,但我似乎没有使公钥机制起作用(基于密码的 ssh 登录有效)。我遵循了以下所有步骤、提示和提示:
我现在怀疑我可能在服务器端(Linux、sshd)上遗漏了一些东西,所以我发布了当前/etc/ssh/sshd_config内容:
Protocol 2
SyslogFacility AUTHPRIV
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
PermitEmptyPasswords yes
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
Subsystem sftp /usr/libexec/openssh/sftp-server
Run Code Online (Sandbox Code Playgroud)
知道我做错了什么吗?
/home/winwin> /usr/sbin/sshd -d
debug1: sshd version OpenSSH_4.2p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA …Run Code Online (Sandbox Code Playgroud)