私は現在、ubuntu であるリモートawsインスタンスにsshを使用して接続しています。しかし、ec2インスタンスのsshキー(.pemファイル)をDownloadから自分のラップトップにある.sshフォルダに移動した後には、Could not resolve hostname mypath/myssh.pem provided, or not known
が表示されます。私はかなりユーザー名とサーバー名を間違っていると確信しています。 私が設定していないものがありますか?他に
、それは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 -v
ながら。 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ファイル)を自分のラップトップでダウンロードから.sshフォルダに移動するのは、最初にダウンロードファイルでec2インスタンスに接続しようとしたためです – EEEEEric