我正在尝试在两个linux服务器之间设置无密码ssh server1:10.54.35.91 server2:10.54.35.27
我已经用我的用户(用户名:path86)登录到server1并完成将用户切换到gsadmin,su - gsdmin并尝试通过ssh进入另一台服务器的gsadmin用户。我已在服务器 1 中使用 ssh-keygen 生成密钥并将其复制到服务器 2 的授权密钥
但我的 ssh 失败,说 permisson returned ,下面详细输出。请帮忙。
[gsadmin@10-54-35-91 john]$ ssh -v [email protected]
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /gshome/gsadmin/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to 10.54.35.27 [10.54.35.27] port 22.
debug1: Connection established.
debug1: key_load_private_type: No such file or directory
debug1: key_load_private_cert: Permission denied
debug1: key_load_private_cert: Permission denied
debug1: key_load_private_cert: Permission denied
debug1: key_load_private_cert: No such file or directory
debug1: key_load_private_type: Permission denied
debug1: key_load_private_type: Permission denied
debug1: key_load_private_type: Permission denied
debug1: key_load_private_type: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_gsadmin type 1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_gsadmin-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /gshome/gsadmin/.ssh/id_ed25519-cert type -1
debug1: identity file /etc/ssh/ssh_host_rsa_key type 1
debug1: key_load_public: No such file or directory
debug1: identity file /etc/ssh/ssh_host_rsa_key-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.54.35.27:22 as 'gsadmin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: curve25519-sha256 need=16 dh_need=16
debug1: kex: curve25519-sha256 need=16 dh_need=16
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/8OVwwr23BiM3MhQ8/hDZgeELHJ0YQJ6iKXOzv82fhQ
debug1: Host '10.54.35.27' is known and matches the ECDSA host key.
debug1: Found key in /gshome/gsadmin/.ssh/known_hosts:2
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
************ WARNING: UNAUTHORIZED PERSONS, DO NOT PROCEED ************
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /gshome/gsadmin/.ssh/id_gsadmin
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /gshome/gsadmin/.ssh/id_rsa
debug1: Trying private key: /gshome/gsadmin/.ssh/id_dsa
debug1: Trying private key: /gshome/gsadmin/.ssh/id_ecdsa
debug1: Trying private key: /gshome/gsadmin/.ssh/id_ed25519
debug1: Offering RSA public key: /etc/ssh/ssh_host_rsa_key
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[email protected]'s password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
[gsadmin@10-54-35-27 ~]$ ls -la ~gsadmin/.ssh/
total 16
drwx------ 2 gsadmin gsadmin 62 Sep 7 11:27 .
drwxrwxrwx 14 gsadmin gsadmin 4096 Sep 7 11:27 ..
-rw-r--r-- 1 gsadmin gsadmin 501 Sep 7 11:27 authorized_keys
-rw------- 1 gsadmin gsadmin 70 Jun 22 14:07 config
-rw-r--r-- 1 gsadmin gsadmin 2386 Aug 16 00:41 known_hosts