質問: awsec2インスタンスへの接続中にキーペアで問題が発生する 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 hmac-md5-etm@openssh.com none debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com 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ボリュームを別のインスタンスに接続します。