An igniting portfolio theme designed
to help you leave quite a mark.
Back to Top

Security SSH Keys Ubuntu 16.04/18.04

Through this system authentication is performed via the public / private key pair.

Part I – Your Key

1. Generate the keys

In the ssh client (the Desktop) we will generate the keys:

ssh-keygen -t rsa -b 4096
  • Enter file in which to save the key → [ENTER]
  • Enter passphrase (empty for no passphrase): → each one chooses his own and repeats on next question
2. Send the key to the server

After completing the previous step you must send the key to the server:

ssh-copy-id [username]@[host]
  • [username] → is the username to login to the server
  • [host] → server IP

With step 2 the key was added to the file ~/.ssh/authorized_keys


Credits: https://www.carrondo.net

Review and tested by: Cristiano Costa

Post a Comment