현재 우분투의 원격 aws 인스턴스에 ssh를 사용하고 있습니다. .At 처음에는 완벽하게 연결할 수있었습니다. 그러나 ec2 인스턴스의 ssh 키 (.pem 파일)를 다운로드 한 후 내 랩톱의 .ssh 폴더로 이동하면 Could not resolve hostname mypath/myssh.pem provided, or not known
이 표시됩니다. 나는 사용자 이름과 서버 이름에 아무런 문제가 없다고 확신한다. 내가 설정하지 못한 것이 있습니까?
게다가, ssh -v
동안은 보여줍니다 debug1: Trying private key: Mypathtokey/my.pem debug1: Authentications that can continue: publickey debug1: No more authentication methods to try.
AWS 연결이 거부되었습니다.
편집 내 명령
ssh -i ~/.ssh/my.pem [email protected]
나는 또한 ssh_config를에 ssh aws
을 설정합니다. ssh -vvv aws
를 사용하는 동안, 그것은
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/mypath/.ssh/ssh.pem
debug2: storing passphrase in keychain
debug3: Search for existing item with query: {
acct = "/Users/mypath/.ssh/ssh.pem";
agrp = "com.apple.ssh.passphrases";
class = genp;
labl = "SSH: /Users/mypath/.ssh/ssh.pem";
nleg = 1;
"r_Ref" = 1;
svce = OpenSSH;
}
debug3: Item already exists in the keychain, updating.
debug3: sign_and_send_pubkey: RSA SHA256: my rsa sha256 keyvalue
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
사용중인 명령을 표시하십시오. – Justinas
* "내 ssh 키를 다른 폴더로 옮긴 후에"* ... 어떤 키? ON 서버 또는 클라이언트? 왜? – Jakuje
ec2 인스턴스의 ssh 키 (.pem 파일)를 내 다운로드 파일에서 ec2 인스턴스에 연결하려고했기 때문에 Download에서 자신의 랩톱으로 .ssh 폴더로 이동합니다. – EEEEEric