LinuxMintコンピューターからssh経由でRHELEC2インスタンスに接続しようとしていますが、次のコマンドを実行すると次のようになります。
ssh ec2-user@SERVER_IP_ADDRESS
このエラーが発生します:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
詳細情報を取得するために、-vフラグを追加し、次の出力を取得しました。
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/user1/.ssh/config
debug1: /home/user1/.ssh/config line 1: Applying options for SERVER_IP_ADDRESS
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to SERVER_IP_ADDRESS [SERVER_IP_ADDRESS] port 22.
debug1: Connection established.
debug1: identity file /home/user1/Desktop/MyKeyPair.pem type -1
debug1: identity file /home/user1/Desktop/MyKeyPair.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
debug1: match: OpenSSH_6.4 pat OpenSSH* 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 7d:1a:81:3e:c8:df:be:e8:f2:7c:3f:46:24:cc:9d:95
debug1: Host 'SERVER_IP_ADDRESS' is known and matches the ECDSA Host key.
debug1: Found key in /home/user1/.ssh/known_hosts:2
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,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Offering RSA public key: EMAIL_ADDRESS
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /home/user1/Desktop/MyKeyPair.pem
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
EC2インスタンスに正常に接続するにはどうすればよいですか?
madeddieは最後のコメントで私に答えをくれました:インスタンスを停止するには、EBSボリュームをデタッチし、EBSボリュームを別のインスタンスに接続します。
ファイル名を含むキー(ファイル)へのフルパスを指定する必要があります。つまり、(C:{dir where the key is}:{keyname.pem}
間違った例:E:\ 360Pan\MySync\360Pan\CorePlay\PyWeb\AmazonAWSMyweb建站门户0042站\ ssh登录密钥\ 123.pem
右:D:\ 360Pan\MySync\360Pan\CorePlay\PyWeb\AmazonAWSMyweb建站门户0042站\ ssh登录密钥\ 123.pem