This is how to easily send torrent files over SSH from a laptop to a home PC, to queue them up for downloading. Brad Choate described essentially the same thing a while ago, but I only just got round to setting up SSH Agent.
- Turn on ssh on the server (eg home computer, running Ubuntu). This means installing the
openssh-server
package and running 'sudo sshd
'. - Run '
ssh-keygen -t dsa
' on the client computer (eg laptop, running OS X). Choose a good password. This generates two files in ~/.ssh (id_dsa and id_dsa.pub) - Copy the public key to the server computer using '
scp ~/.ssh/id_dsa.pub yourserver.com:
' - SSH into the server and '
mkdir ~/.ssh
' then 'mv ~/id_dsa.pub ~/.ssh/authorized_keys
' - Back on the client, install SSH Agent and set it to start when you log in.
- Open SSH Agent and, in the Preferences, add a default identity using the file ~/.ssh/id_dsa
- Edit your IP address into this AppleScript, and save it as an Application Bundle on the desktop.
- SSH into the server from the command line a couple of times more, to make sure it's working without asking for a password