2017-06-24 5 views
-2

Ich habe gerade meine AWS Deep Learning-Instanz eingerichtet und mit einer neuen Schlüsselpaardatei verknüpft, die ich erstellt habe.Amazon ssh-Berechtigung verweigert (öffentlicher Schlüssel) mit Fehlermeldung

aber wenn ich versuche, mit folgendem Befehl ssh:

ssh -v -i /Users/username/aws-deep-learning-ami.pem [email protected]_IP.compute.amazonaws.com 

erhalte ich die ziemlich lange Fehlermeldung: Zugriff verweigert (öffentlicher Schlüssel).

die Details mit -v Drucken zeigt dies:

OpenSSH_7.2p2, OpenSSL 1.0.2k 26 Jan 2017 
debug1: Reading configuration data /etc/ssh_config 
debug1: /etc/ssh_config line 57: Applying options for *.com 
debug1: /etc/ssh_config line 67: Applying options for *.* 
debug1: /etc/ssh_config line 77: Applying options for * 
debug1: Connecting to instance.amazonaws.com [ip] port 22. 
debug1: using TCP window size of 65536/65536 
debug1: Connection established. 
debug1: key_load_private_cert: No such file or directory 
debug1: key_load_cert: No such file or directory 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/aws-deep-learning-ami.pem type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/aws-deep-learning-ami.pem-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/id_rsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/localhost/id_rsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/localhost/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/clusterhost/id_rsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/username/.ssh/clusterhost/id_rsa-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_7.2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000 
debug1: Authenticating to instance as 'ubuntu' 
debug1: Miscellaneous failure (see text) 
No credentials cache file found 

debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: algorithm: key 
debug1: kex: host key algorithm: key 
debug1: kex: server->client cipher: key MAC: <implicit> compression: none 
debug1: kex: client->server cipher: key MAC: <implicit> compression: none 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: key 
debug1: Host 'instance.compute.amazonaws.com' is known and matches the ECDSA host key. 
debug1: Found key in /Users/username/.ssh/known_hosts:7 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering ECDSA public key: publickey 
debug1: Authentications that can continue: publickey 
debug1: Offering ECDSA-CERT public key: corp/normal 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /Users/username/aws-deep-learning-ami.pem 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /Users/username/.ssh/id_rsa 
debug1: Trying private key: /Users/username/.ssh/localhost/id_rsa 
debug1: Trying private key: /Users/username/.ssh/clusterhost/id_rsa 
debug1: No more authentication methods to try. 
Permission denied (publickey). 
+0

Das bedeutet nur, dass die Anmeldeinformationen nicht funktionieren - falsche Anmeldeinformationen, falscher Benutzer, was auch immer. Das ist nicht wirklich eine Programmierfrage, vielleicht besser bei [su] oder [sf] – pvg

+0

Danke für die schnelle Antwort! Sollte ich für jedes Schlüsselpaar einen anderen Benutzer verwenden? – user3642173

+0

Versuchen Sie stattdessen den Benutzer ec2-user. – stdunbar

Antwort

1

Im Allgemeinen Standardbenutzernamen verwenden hatte:

  • Amazon Linux verwendet ec2-user
  • Ubuntu AMIs verwenden ubuntu
  • Amazon EMR verwendet hadoop
0

Als stdunbar erwähnte ich EC2-Benutzer statt ubuntu

Verwandte Themen