Install / Append SSH Key In A Remote Linux / UNIX Servers Authorized_keys

‮www‬.lautturi.com
Install / Append SSH Key In A Remote Linux / UNIX Servers Authorized_keys

To install or append an SSH key to the authorized_keys file on a remote Linux or UNIX server, you can use the following steps:

  1. Generate an SSH key pair on your local machine:
ssh-keygen -t rsa

This will generate an SSH key pair, consisting of a private key and a public key. The private key should be kept secret and stored on your local machine, while the public key can be shared with others.

  1. Copy the public key to the remote server:
ssh-copy-id user@remote_server

Replace user with the username on the remote server, and remote_server with the hostname or IP address of the remote server. This will copy the public key to the authorized_keys file on the remote server.

  1. Test the connection:
ssh user@remote_server

If the connection is successful, it means that the SSH key has been installed or appended to the authorized_keys file on the remote server.

Created Time:2017-10-29 22:08:49  Author:lautturi