I am a newbie to AWS and need some help. I have a .pub file, a host name and username. I have been trying to connect to the server, but keep getting a Permission denied (publickey) error. Someone else set up the instance.
The .pub file is on my desktop. I am in desktop in my directory. Did chmod 400 to the .pub file. I then try: 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.