ssh-copy-id 在特定服务器上不起作用

ssh-copy-id 在特定服务器上不起作用

我有一台运行 Ubuntu 的服务器。我无法使用 ssh-copy-id 授予任何客户端访问权限:

这是服务器中 sshd_config 文件的一部分

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  .ssh/authorized_keys

这是我尝试通过 ssh 连接时的输出:

juan@utils:~/remote-backups$ ssh -v manolo
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/juan/.ssh/config
debug1: /home/juan/.ssh/config line 7: Applying options for manolo
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Hostname has changed; re-reading configuration
debug1: Reading configuration data /home/juan/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to [ip] [[ip]] port 22.
debug1: Connection established.
debug1: identity file /home/juan/.ssh/id_rsa type 1
debug1: identity file /home/juan/.ssh/id_rsa-cert type -1
debug1: identity file /home/juan/.ssh/id_dsa type -1
debug1: identity file /home/juan/.ssh/id_dsa-cert type -1
debug1: identity file /home/juan/.ssh/id_ecdsa type -1
debug1: identity file /home/juan/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/juan/.ssh/id_ed25519 type -1
debug1: identity file /home/juan/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 0b:d6:6c:c5:98:f2:c5:40:52:ce:b8:90:ee:7f:81:e9
debug1: Host '[ip]' is known and matches the ECDSA host key.
debug1: Found key in /home/juan/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/juan/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/juan/.ssh/id_dsa
debug1: Trying private key: /home/juan/.ssh/id_ecdsa
debug1: Trying private key: /home/juan/.ssh/id_ed25519
debug1: Next authentication method: password
juan@[ip]'s password: 

我尝试通过多个客户端进行连接,所以我怀疑问题出在服务器部分。我也在服务器上重新启动了 ssh 服务。

其他连接正在我的本地机器上运行,因此文件权限可能没问题

服务器中的文件权限:

/主页/胡安/.ssh

drwx------ 2 juan juan 4.0K Oct 24 08:04 .ssh

-rw------- 1 juan juan 9.4K Dec 23 09:31 authorized_keys

相关内容