Using the `screen` command.

Tech Notes

One useful application of screen – ssh in to a computer, run a command that will take a while, disconnect and go home, ssh back in and reconnect to the command you were running.

whale:mediaplayer rossetti$ ssh knoppix@10.0.0.109
knoppix@Knoppix:~$ screen rsync -avvz --numeric-ids /media/hda1/ /media/transit/mini-dell/media/hda1/
[CTRL+A CTRL+D disconnect]
[detached]
knoppix@Knoppix:~$ screen -ls
There is a screen on:
4489.pts-1.Knoppix(Detached)
1 Socket in /var/run/screen/S-knoppix.
knoppix@Knoppix:~$ exit
whale:mediaplayer rossetti$ ssh knoppix@10.0.0.109
knoppix@Knoppix:~$ screen -r