2014-09-15 3 views
-1

EC2 머신으로 ssh를 시도하고 ssh가 작동을 멈췄습니다. 내가 어떻게 고장 났는지는 모르겠지만 이제는 연결할 수 없습니다. 이미 새 키를 만들려고했지만 도움이되지 않습니다.권한 거부 (공개 키) ssh

$ ssh -vT ****@****.****-2.compute.amazonaws.com 
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014 
debug1: Reading configuration data /etc/ssh_config 
debug1: Connecting to ec2-****.****-2.compute.amazonaws.com [****] port 22. 
debug1: Connection established. 
debug1: identity file /home/Brad/.ssh/id_rsa type 1 
debug1: identity file /home/Brad/.ssh/id_rsa-cert type -1 
debug1: identity file /home/Brad/.ssh/id_dsa type -1 
debug1: identity file /home/Brad/.ssh/id_dsa-cert type -1 
debug1: identity file /home/Brad/.ssh/id_ecdsa type -1 
debug1: identity file /home/Brad/.ssh/id_ecdsa-cert type -1 
debug1: identity file /home/Brad/.ssh/id_ed25519 type -1 
debug1: identity file /home/Brad/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.6.1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2 
debug1: match: OpenSSH_6.2 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 **** 
debug1: Host '****.****-2.compute.amazonaws.com' is known and matches the ECDSA host key. 
debug1: Found key in /home/Brad/.ssh/known_hosts:1 
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 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/Brad/.ssh/id_rsa 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /home/Brad/.ssh/id_dsa 
debug1: Trying private key: /home/Brad/.ssh/id_ecdsa 
debug1: Trying private key: /home/Brad/.ssh/id_ed25519 
debug1: No more authentication methods to try. 
Permission denied (publickey). 

나는 모든 개인 정보를 *로 대체했습니다.

고마워요.

+0

이것은 SSH 구성에 관한 것이므로 _ 주제가 아닙니다. _programming_가 아닙니다. 그것은 [su]에 속한다. –

답변

0

아무 것도 없습니다. ssh 개인 키를 참조하는 명령이 없습니다. 아래 명령을 실행 해보십시오 :

ssh -i <path_to_the_private_key> [email protected]<EC2_Hostname>

을 위의 명령에서, 내가 ubuntu으로 사용자 이름을 사용하고 있습니다. 사용중인 AMI에 따라 해당 AMI에 해당하는 사용자 이름을 변경해야합니다.

관련 문제