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)
When you log into the remote machine - a trust is created - allowing you to log in again without specifying a password
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/id_rsa.pub | ssh -p 34890 email@example.com "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.