SSH Cheatsheet

SSH Cheatsheet

Various techniques for working with SSH.

Generating An Elliptic Curve Key

To generate an elliptic curve key, rather than an RSA, use one of the algorithms like ed25519:

$ ssh-keygen -o -a 256 -t ed25519

Source: Cryptsus

Copying Key To Remote Host

To deploy the public key to a remove host, you could either use the existing method of concatinating the key to ~/.ssh/authorized_keys, or you could use ssh-copy-id:

$ ssh-copy-id user@hostname.example.com

This copies your default identity. To copy an arbitrary key, include the -i switch:

$ ssh-copy-id -i my_key user@hostname.example.com

Source: Stack Overflow