SSH Quick guide to Keyless setup


A great way to connect to machines



ssh-keygen -t rsa

Thats it !!!

Copy the Keys


There are 2 ways - the simple (assuming everything is standard ie ssh ports)

ssh-copy-id user@

When you log into the remote machine - a trust is created - allowing you to log in again without specifying a password

Non Standard

Should the ssh be used with a special port, cipher etc - then the Standard way will not work.

So instead you need to manually (1 Line !!) do this

    cat ~/.ssh/ | ssh -p 34890  "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"

SSH A command

This now becomes

   ssh user@remote "df -kh"

No waiting no fuss. Great for Scripting.