2011-08-17 5 views
0

는이 게시물을 읽어AWS 공개 키 거부 문제

AWS ssh access 'Permission denied (publickey)' issue

정보가 관련이 있지만, 내 문제를 해결하는 데 도움이되지 않습니다. 나는 다음 명령을 사용하여 ec2-user를 사용하여 AWS의 나의 리눅스 인스턴스에 로그인 할 수 있었다 :

ssh -i key.pem ec2-user @ [address] .compute-1.amazonaws.com from my MacBook 터미널 지난 몇 주 동안

, 나는 지금이 오류를 받고 있어요 ". 권한이 거부 (공개 키)"

나는

을 시도

는 ssh -v -i key.pem EC2 사용자 @ [주소] .compute - 1.amazonaws.com 맥북 터미널에서

나는이 출력 얻을 :

OpenSSH_5.2p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: Connecting to [address].compute-1.amazonaws.com [address] port 22. 
debug1: Connection established. 
debug1: identity file key.pem type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 
debug1: match: OpenSSH_5.3 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.2 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host '[address].compute-1.amazonaws.com' is known and matches the RSA host key. 
debug1: Found key in [path]/.ssh/known_hosts:1 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Trying private key: key.pem 
debug1: read PEM private key done: type RSA 
debug1: Authentications that can continue: publickey 
debug1: No more authentication methods to try. 
Permission denied (publickey). 

무슨 일인지에 대한 조언이 있으십니까? 이 문제를 어떻게 해결할 수 있습니까?

이전에 만든이 인스턴스에 다른 사용자 계정이 있습니다. 나는 그걸로 로그인 할 수 있고 루트로 sudo 할 수있다. ec2-user로 더 이상 로그인 할 수 없습니다.

감사합니다.

+0

아마존 지원에 전화를 걸어 보셨습니까? –

+0

지난 몇 주 동안 AWS에서 새 키 생성 또는 컴퓨터에서 삭제 된 SSH 키 등의 작업을 수행했습니다. – 18bytes

+0

분명히 SSH 키에 문제가있는 것처럼 보입니다. 루트 사용자를 시도 했습니까? – 18bytes

답변

1

루트로 로그인해야 할 수도 있습니다. bitnami 이미지를 사용하는 경우 'bitnami'로 로그인하십시오.

예 : ssh -v -i key.pem [email protected][address].compute-1.amazonaws.com