Tired of always typing in your password and ssh <thing>@<otherthing>. I’ve got a quick fix for you !
Check for existing SSH keys
In case you’ve got another SSH keys, you can check it with this command below:
If you don’t see a thing, I’ve got your back !
Generate new SSH keys
To generate new SSH keys enter the following command:
Copy your public key to your linux remote computer
To copy your public key to your linux machine, use the following command to append the public key to your
authorized_keys file, sending it over SSH:
Then type in your password, and success !
Quick ssh your remote computer.
From time to time you need to access your remote computer with the basic ssh command, but you’ll get a little lazy!
alias <NAME>='ssh <USERNAME>@<IP-ADDRESS>'" >> ~/.bashrc
This will append an alias in your .bashrc. For example, I connect to my raspberry pi.
alias rpi='ssh firstname.lastname@example.org'" >> ~/.bashrc
To load the changes in your current terminal:
As example to mine, whenever I need to connect to my Raspberry pi, I simply do this:
I will get connected to my Raspberry Pi quickly and passwordless !