Easy Way SSH Key Setup on Ubuntu
Apr 25, 2023
Set up SSH key authentication:
SSH key authentication provides a secure and convenient way to log in to the server without entering a password.
On your local machine, generate a new SSH key pair:
ssh-keygen
Copy the public key to the server or your github account:
ssh-copy-id [username]@[server_ip_address] -p [port_number]
Now you should be able to log in to the server without entering a password:
ssh [username]@[server_ip_address] -p [port_number]
That’s it! You should now have SSH set up on your Ubuntu server.