banner
阿道

阿道

阿道博客

macOS System - Amazon Cloud EC2 - Key (Passwordless) Login to Server

Account Registration and Server Creation#

For the overseas version of Amazon Cloud, the server can be located in Singapore or Japan, which offers relatively faster speeds.

It is important to note to select "Create a new key" when creating the key and to download and save it properly.

Local Operations#

  1. Move the file
    Save the downloaded key to the download directory and rename it; I renamed it to ec2 and moved the key file. If there is no relevant directory, you can create one yourself.

mv ~/Downloads/ec2.pem ~/.ssh/ec2.pem

  1. Set permissions
    chmod 400 ec2.pem

  2. Connect
    ssh -i {the full path of your .pem file} ec2-user@{instance IP address}

ssh -i ~/.ssh/ec2.pem centos@1.2.3.4
Note that the name before the @ needs to be modified according to your server system; mine is centos7, please modify it accordingly for other systems!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.