Thursday, November 21, 2013

SSH with no password

SSH with no password:
​Here is a two step process to use SSH/SCP and access remote machines without password.

1. Generate a public/private rsa key pair in the local machine (client):
Command:  ”ssh-keygen“
The public key will be saved in a file at ~/.ssh/id_rsa

2. Copy the id to the remote machine (server):
Command: “ssh-copy-id  UserName@ServerAddress“

Thats all need to do. Now you can try “ssh UserName@ServerAddress” and it should login without asking password. Same with scp command.