Mac Login Amazon Cloud Server error: Permission denied (PublicKey).

Source: Internet
Author: User

Application for Amazon Cloud Server EC2, instance for Ubuntu system

First, open the terminal, locate the folder where the key is placed;

Second, ensure that the private key is not publicly visible:

chmod 400 key file name. PEM

Three, two ways to connect to the cloud server: (assuming that the instance of the public IP is: 11.22.33.44)

Ssh-i key file name. PEM [email protected]

Ssh-i key file name. PEM [email protected]

Both of these methods are error:

Permission denied (PublicKey).

Iv. Solutions:

The following paragraph is in the official Amazon documentation:

Get The default user name for the AMI so used to launch your instance

  • For a Amazon Linux AMI, the user name is ec2-user .

  • For a Centos AMI, the user name is centos .

  • For a Debian AMI, the user name is admin or root .

  • For a Fedora AMI, the user name is ec2-user or fedora .

  • For a RHEL AMI, the user name is ec2-user or root .

  • For a SUSE AMI, the user name is ec2-user or root .

  • For a Ubuntu AMI, the user name is ubuntu or root .

  • Otherwise, if ec2-user and root don ' t work, check with the AMI provider.

The last one shows the use of ec2-user and root can not connect, so need to try a bit more, because I installed the Ubuntu system, the connection command directly into the Ec2-user Ubuntu, the perfect connection.

Mac Login Amazon Cloud Server error: Permission denied (publickey).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.