First of all, on your own computer, create a public key identification by generating manually from ssh-keygen command like below:
[root@tuxbook ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
After it executed successfully, it will generated a file named id_rsa.pub under /root/.ssh directory. Copy this file by giving a new name with authorized_keys.
[root@tuxbook ~]# cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
Put this latest file into target machine in the same directory. That’s all. The next time you try to connect to remote host, it will always accepting you to log on since your computer identification have been recognized by authorized_keys file in the remote host. No passwords prompting on your screen anymore.
Keep this trick carefully & don’t let anyone touch your terminal because it has unlimited access to control the servers you had made after login with SSH. Cheers…
PS: If you've benefit from this blog,
you can support it by making a small contribution.