Wednesday, October 24th, 2007

Remote Torrent Downloads Via SSH

I don't like using bittorrent to download large files when I'm using my network at home; the process consumes my net connection and simple tasks like browsing the web become painfully slow. Instead, I start my torrent sessions remotely via an SSH connection while I'm at work. By doing this I maximise the potential of my 512k ADSL line by using it for downloading torrents when I'm connected to a different network.

SSH Server

On my home network I have an old Toshiba laptop running Ubuntu Server Edition. This system has OpenSSH Server installed and allows me to connect to my home network from my place of work. Unfortunately, installing, configuring and using OpenSSH Server is beyond the scope of this post. However, it's not too difficult and there are plenty of good articles out there about the subject. See: https://help.ubuntu.com/7.04/server/C/openssh-server.html

Screen and BitTornado

Once I'm connected to my home network I then use a combination of Screen and BitTornado to download any torrent files.

Screen enables me to start a download and exit my SSH connection without stopping the download. I can then reconnect via SSH and use the command "screen -r" to return to the download screen and check on the progress of the download.

BitTornado is not required but I like it as it adds additional features to Ubuntu's default bittorrent client.

You can install Screen and BitTornado with the following terminal command:

sudo apt-get install screen bittornado

Usage

1. To start a new download enter the following command [remember to replace the example URL with the location of the real torrent]:

screen btdownloadcurses http://example.com/example.torrent

You should now be able to see something similar to the screengrab below:

Example of Screen and BitTornado

2. To detached the screen and leave the download running use the following key combination:

<Ctrl>+<A>+<D>

3. To reattach the screen enter the following command:

screen -r

4. Once the download has finished you can kill the screen with the following key combination:

<Ctrl>+<C>

Notes: If you have multiple screens running, entering the command "screen -r" will return a list of available screens to reattach.

More information about Screen and its usage is available with the following terminal command:

man screen

Tagged with: bittorrent, linux, ssh, ubuntu


5 Responses to “Remote Torrent Downloads Via SSH”

  1. Alan Pope wrote,

    rtorrent is also a very nice client, can also do multiple files at once (in the same way that you can do "btlaunchmanycurses ." with the client you use - you can do "rtorrent *"). It has some nice options for tweaking bandwidth use. Worth a look.

  2. caner wrote,

    is it possible to download a torrent directly to rapidshare through a web service. something like that would be great.

  3. Nishkorma wrote,

    @Caner. it is possible to download a .torrent in an imageshack.us account and download it via their connection. U can then download the actual file from imageshack server via http. It supports download managers,gives you 10gb/month bandwidh and 5gb space for free,and more if you are ready to pay

  4. ocularb0b wrote,

    ktorrent has a plugin that scan a directory for torrent files and starts the download automatically. then you would just have to scp .torrent files to that directory and youre done .

  5. gigel wrote,

    btlaunchmanycurses is even better, give it a directry and then just scp files there. From time to time login interactively and see progress with screen -r btlaunchmanycurses is already included in the standard bittorrent client, just use it instead of btdownloadcurses

Add Your Comment

Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.