SSH – Connect to SSH with RSA certificate

security-iconUsing RSA certificate will increase your account/server security. You can configure SSH server to only accept RSA certificate for your root user. Here is how to use certificates for authentications.

On your local system (laptop/workstation/etc)
First we will create the certificate on your local system.
[sourcecode language=”text”]
john@debian7-dev:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/john/.ssh/id_rsa):
/home/john/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/john/.ssh/id_rsa.
Your public key has been saved in /home/john/.ssh/
The key fingerprint is:
df:35:53:7a:63:6c:b6:95:c6:90:4c:ec:54:fd:03:99 john@debian7-dev
The key’s randomart image is:
Now your certificate have been created, and stored in your home folder/.ssh/id_rsa

Now we need to copy/install the certificate on the remote system.

On your local system: (when copying the certificate to the remote account it will ask for your password on the remote system)
[sourcecode language=”text”]
john@debian7-dev:~$ ssh-copy-id john@
john@’s password:
Now try logging into the machine, with "ssh ‘john@’", and check in:


to make sure we haven’t added extra keys that you weren’t expecting.
Then you are ready to log on to the remote system as john without using passwords.

Happy sshing!

About Author

Related Posts

php8 gd

PHP8 gd Activate after installation

PHP8 GD activate after installation. GD doesn’t get activated by default. Not even a reboot after installation will activate it. So how do we do it? In…

Debian 12: linux-image-6.1.0-10amd64

Troubleshooting dependency issues in Debian 12: Resolving linux-image-6.1.0-10amd64 package dependency problems. If you installed the Debian 12 from the live image the issue is the raspi-firmware. Even…

4 Best Free Nas Software That Is Open Source

Free NAS software or operating systems that are free to use and will turn a computer into a NAS more advanced than the dedicated boxes sold. What…

Raspbian default password

Raspbian default password

Looking for the Raspbian default password? It is the most essential username and password that you will need for your raspberry. At least if you are running…

OpenMediaVault default password

OpenMediaVault default password

OpenMediaVault default password is printed in the documentation. I did not see it the first time I installed it either. So I had to do some detective…

Debian change dns

Debian change DNS settings to a new DNS

Debian change DNS settings for speed improvement or privacy. It is really easy to do. So let us see how it’s done and get to it. The…

Leave a Reply