SSH Password-less Login - Using Key Authentication

You can login to a remote Linux server without entering password, using ssh-keygen and ssh-copy-id as explained in this article.

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.

Create public and private keys using ssh-key-gen on local-host.

$~: sudo ssh-keygen -b 4096

Copy the public key to remote-host using ssh-copy-id.

$ ssh-copy-id -i ~/.ssh/ remote-host



Popular posts from this blog

How To Make IoT Messaging with BashShell

How To Make IoT Tweet with Python