[root@bogon ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. 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: SHA256:9cjANdBB5Uez1RUvOHpz1kbsQlWjmL4/eRNSauNZ8K4 root@bogon The key's randomart image is: +---[RSA 2048]----+ | .+=o. ooX| | . ..ooo.*+| | o .o+.= +| | +.+ = * | | S +.+ O +| | ..O * | | .o B .| | .= + | | E+ .| +----[SHA256]-----+ [root@bogon ~]# [root@bogon ~]# [root@bogon ~]# [root@bogon ~]# cd [root@bogon ~]# cd .ssh [root@bogon .ssh]# ls id_rsa id_rsa.pub [root@bogon .ssh]# cat id_rsa.pub >> authorized_keys [root@bogon .ssh]# ls authorized_keys id_rsa id_rsa.pub [root@bogon .ssh]# chmod 600 authorized_keys [root@bogon .ssh]# ssh localhost The authenticity of host 'localhost (::1)' can't be established. RSA key fingerprint is SHA256:92H28KhI3EPvAoTIblOfgpTzCQ8XoSNNMjATiN8DbEs. RSA key fingerprint is MD5:9f:0d:61:0c:9c:53:5f:c3:77:31:8b:27:36:24:a5:86. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (RSA) to the list of known hosts. Last login: Mon Apr 8 01:04:07 2019 from 192.168.0.104 [root@bogon ~]#