ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa.Your public key has been saved in /home/user/.ssh/id_rsa.pub.The key fingerprint is:58:a9:ba:a9:c4:58:c0:18:1c:ef:f4:5c:9c:69:f2:73 user@laptopThe key's randomart image is:
scp -P port /home/user/.ssh/id_rsa.pub user@zdalny_serwer:~/ssh user@IP -p portcat ~/id_rsa.pub >> ~/.ssh/authorized_keys
# /etc/ssh/sshd_confPasswordAuthentication no