我正在尝试使用SSH登录到我的Amazon AWS实例。我刚刚创建了实例,并使用该实例创建了一个新的keyPair。我将该KeyPair放置在我试图从中获取ssh的目录中。使用密钥对登录AWS
我做$ ssh -i myKeyPair.pem [email protected]
。
它给出了这样的输出:
debug1: Trying private key: myKeyPair.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).
尝试使'myKeyPair.pem'只能由拥有chmod 600的所有者读取myKeyPair.pem; chown youruser myKeyPair.pem'。 ssh对于使用可能会因其他用户具有读/写访问权限而被盗用的密钥文件相当挑剔。 – ianjs