SSH設定エラー:権限が拒否されました。もう一度お試しください。

SSH設定エラー:権限が拒否されました。もう一度お試しください。

2つのLinuxサーバーserver1:10.54.35.91 server2:10.54.35.27の間にパスワードのないSSHを設定しようとしています。

私のユーザー(ユーザー名:path86)としてserver1にログインし、ユーザーをgsadmin、su - gsdminに切り替え、別のサーバーのgsadminユーザーとしてsshingを試みました。サーバー1でssh-keygenを使用して鍵を生成し、それをサーバー2の認証済み鍵にコピーしました。

しかし、私のSSHが失敗し、その権限が返されました。詳細な出力は次のとおりです。助けてください。

[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

関連情報