Programs over SSH

This is about doing an automated ssh connection to a server. First some naming in the explanation below.
Server : The machine you connect to.
Client : The machine you make the connection from.
luser : Local User or user on the client
ruser : Remote User or user on the server

First you need to create a public key on the client. This only needs to be done once.

ssh-keygen -t rsa
It will ask where to place it. The default should be good.
It will ask for a passphrase. Just press enter there. Twice.

You now will need to let the server know who you are.

ssh-copy-id -i .ssh/id_rsa.pub ruser@server
If you have never made a connection over ssh to that server, you will be asked if you accept the finger print. Press yes there and then enter the password for ruser.
The screen says it all then. Do `ssh 'ruser@server'` and check the keys. You will notice that the password is not asked anymore

If you have installed sshfs you can now do something like `sshfs ruser@server:/home/ruser ~/ruser_server` after you made on the client the directory ~/ruser_server.