August 13, 2010, 6:17 pm
Sometimes you want to ssh to a machine, leave a process running there and exit. Screen allows you to do that:
$ screen
$ sh myscript.sh
[type Ctrl+a+d to detach window]
$ exit
The process won’t stop even if you close the ssh session.
August 31, 2009, 9:35 am
First upload your public key to the server you want to log in:
scp .ssh/id_rsa.pub user@1.2.3.4:/home/user
On the server, add the public key file to the authorized_keys file:
cat id_rsa.pub >> .ssh/authorized_keys
Now you can login using public key authentication and you don’t have to enter a password anymore.