2011-11-14 4 views
0
ssh -i [full path to keypair file] [email protected][EC2 instance hostname or IP address] 

나는 이것을 수행하고 이전에 작동했으며 갑자기 권한 거부 (공개 키) 오류가 발생했습니다.사용 권한이 거부 됨 (publickey)

mac-pro:aws me$ ssh -i key.pem [email protected]_ip_address -v 
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: Applying options for * 
debug1: Connecting to elastic_ip_address [elastic_ip_address] port 22. 
debug1: Connection established. 
debug1: identity file key.pem type -1 
debug1: identity file key.pem-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu4 
debug1: match: OpenSSH_5.5p1 Debian-4ubuntu4 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.6 
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 'elastic_ip_address' is known and matches the RSA host key. 
debug1: Found key in /Users/me/.ssh/known_hosts:8 
debug1: ssh_rsa_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 
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). 

btw, 세 가지 다른 EC2 인스턴스에 대해 동일한 키를 사용하고 있습니다. 이 오류가 발생하는 이유는 이것이 확실하지 않습니다. 동일한 키를 사용하여 ssh를 통해 두 개의 다른 EC2 인스턴스에 액세스 할 수 있습니다. 하지만 하나의 인스턴스에만 액세스 할 수는 없습니다.

미리 감사드립니다.

답변

1

사용자가 맞습니까? ec2-user @ or root @

+0

LAPP Bitnami에 문제가있었습니다. 나는 root의 제안을 사용했다. 그다음 오류는 bitnami로 로그인해야한다고 명시했다. 나는 bitnami 사용자와 ssh 그리고 그것은 효과. – thepriebe

관련 문제