[英]Public key error connecting to AWS EC2 Ubuntu instance on Mac with .pub file, username and host name
I am a newbie to AWS and need some help. 我是AWS的新手,需要一些帮助。 I have a .pub file, a host name and username.
我有.pub文件,主机名和用户名。 I have been trying to connect to the server, but keep getting a Permission denied (publickey) error.
我一直在尝试连接到服务器,但不断收到Permission denied(publickey)错误。 Someone else set up the instance.
其他人设置了实例。
The .pub file is on my desktop. .pub文件在我的桌面上。 I am in desktop in my directory.
我在我的目录中的桌面。 Did chmod 400 to the .pub file.
chmod 400到.pub文件。 I then try: ssh -i /Users/machine/Desktop/filename.pub ubuntu@placeholder.com
然后我尝试:ssh -i /Users/machine/Desktop/filename.pub ubuntu@placeholder.com
Please let me know if you have any suggestions. 如果您有任何建议,请告诉我。
Thanks! 谢谢!
您需要私钥才能连接到EC2。
ssh -i /path/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.