Written by Steve Perry
Published on

Using RSA encryption keys to sign into a remote server via SSH

Generate an RSA key and copy the public version of that key to the remote server as follows:

Create a key set

If you already have a key set up then you can ignore this step.

In the terminal enter: ssh-keygen -t rsa

Accept the default location and add a custom passphrase when prompted.

Copying your public key to the remote server

cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"

Where user is your username and machine is the IP address of the remote server.

Steve Perry Creative Ltd

Studio and registered office: 4 Back Lane, Brown Edge, Staffordshire ST6 8QS.

Copyright © 2012 – 2023 Steve Perry Creative Ltd., unless otherwise noted.

Registered in England & Wales, number 08354632.

Colophon

Typeset in Söhne Kräftig and Söhne Buch, by Klim Type Co.

Set as 32/64, 24/32, 20/32, and 12/16 on an 8px/96px grid.

Colour palette selected for AAA contrast.