SSH Remote Login (1) – Use Key Pair Generated by Server

This page covers how to set up the SSH remote connection between local computer and the remote server.

There are two major approaches to establishing an SSH remote connection:

  • 1) Use a key pair generated by the Server
  • 2) Use a key pair generated by the Client.

In this section, we'll explain the first case, which is generally simpler than the second case.

SSH remote login using key pair generated by SERVER

Key Steps

1. Download a private key from your remote server or cloud service provider (in your web browser)

How and where you can get a private key can differ by service provider, so please follow the instructions of your service provider. In this section, we'll explain the case of AWS Lightsail.

2. Save the key to the .ssh directory under your home directory (on your local computer)

You can set another path for the key file; however, using the same location makes managing multiple key files easier.

3. For Mac mac.svg, change Access Mode to manage security (on your local computer)

windows.svg For Windows, this step may not be needed.

You need to change the access mode for the .ssh directory and the key you'll use for remote login. This is done to prohibit access to the directory and key files for other users.

  • .s