SSH Passwordless Login

Step-1: Create a Public Key:

By using ssh-keygen to create a authentication key pair of SSH. this key pairs are used for automatic logins.

ssh-keygen -t rsa

Step-2: Copy Public key and paste in authorized_keys file:

Now we are going to copy a id_rsa.pub public key and paste that key in server .ssh/authorized_keys file

cp id_rsa.pub autorized_keys

Step-3: Permission to aceess a authorized_keys file:

Here we give a read and write acess to a authorized_keys file

chmod 600 authorized_keys

Step-4: Copy authorized_key file from local server to remote server:

Now we have an authorized_keys file in the local server. by using the following command to we gonna copy the authorized_keys file local server to the remote server.

ssh-copy-id root@remote_IP_address

Now if you check a remote server, here you can find local server authorized_keys were copied to a remote server in .ssh folder.



SSH Passwordless Login

Step-1: Create a Public Key:

By using ssh-keygen to create a authentication key pair of SSH. this key pairs are used for automatic logins.

ssh-keygen -t rsa


Step-2: Copy Public key and paste in authorized_keys file:

Now we are going to copy a id_rsa.pub public key and paste that key in server .ssh/authorized_keys file

cp id_rsa.pub autorized_keys

Step-3: Permission to aceess a authorized_keys file:

Here we give a read and write acess to a authorized_keys file

chmod 600 authorized_keys

Step-4: Copy authorized_key file from local server to remote server:

Now we have an authorized_keys file in the local server. by using the following command to we gonna copy the authorized_keys file local server to the remote server.

ssh-copy-id root@remote_IP_address

Now if you check a remote server, here you can find local server authorized_keys were copied to a remote server in .ssh folder.