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@192.0.0.10
vin@192.0.0.10’s password:
Last login: Mon May 22 10:45:03 2017 from 192.0.0.10
-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.
- 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)
- Run this command to copy the Key file from client to server
$cat ~/.ssh/id_rsa.pub | ssh vin@192.0.0.10 ‘umask 0077; /bin/mkdir -p .ssh; /bin/cat >> .ssh/authorized_keys && echo “Done!”‘
After running above command, server 192.0.0.10 do not ask for password when user vin try to login.
vin@CLIENT:~$ ssh vin@192.0.0.10
Last login: Mon May 22 11:54:29 2017 from 192.0.0.10
[vin@SERVER ~]$