SSH Keys – Password less authentication

I was trying to setup SSH Keys between two different flavors of Linux Host by following this Howto

I did run commands exactly as per mentioned in the how to; but it didn’t work. Error message as under

vin@CLIENT:~$ ssh vsa@
vin@’s password:
Last login: Mon May 22 10:45:03 2017 from
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: tty: command not found
-bash: uname: command not found

After googling and trail and error method finally found a fix.

Instead of Step 3 as per the above How to, use the below commands.

  1. Ensure on the server proper permissions set on the .ssh folder if not set permissions as

$chmod -R 775 .ssh (.ssh is located in user home directory e.g: /home/vin)

  1. Run this command to copy the Key file from client to server

$cat ~/.ssh/ | ssh vin@ ‘umask 0077; /bin/mkdir -p .ssh; /bin/cat >> .ssh/authorized_keys && echo “Done!”‘

After running above command, server do not ask for password when user vin try to login.

vin@CLIENT:~$ ssh vin@
Last login: Mon May 22 11:54:29 2017 from
[vin@SERVER ~]$