REMOTE CONTROL SD WITH SDCLI

SDLI

What is sdcli ?

sdcli is not a stand alone application. This means that you cannot simply double click on sdcli and expect it to launch a program.

sdcli is a very simple shell script that allows you to control Speed Download from the command line (Terminal). It, in fact, uses the osascript command to run Applescripts that control Speed Download.

Why would I want to do that?

Obviously if you are sitting in front of the computer and have SD's graphical interface within reach, there is little advantage in using sdcli. But, if you are stuck away from your computer, you can use this to remote control Speed Download. Enable remote login on your computer and ssh to your computer from anywhere in the world. If you have sdcli ready to go, you can have SD perform downloads for you, even though you aren't there. For example if you see something interesting at work, you could ssh into your machine at home (providing it's on of course!), and use sdcli to start your download. Like that when you come home, your download will be done! This is especially useful if you have a very fast Internet connection elsewhere than where you are currently located.

BACK TO TOP

Basic instructions for using Terminal:

This assumes you are sitting in front of your computer, with a terminal window open. If you want to do this from another computer, you'll need to ssh to your machine first

  1. Open Terminal
  2. Go into the folder where sdcli is located by using the cd command. (For example: cd /Applications/Speed\ Download)
  3. Make the script executable by typing: chmod a+x sdcli
  4. Run the script by typing: ./sdcli

This will display a brief usage summary for using Speed Download.




For example, to download a file you type:

Note: If you don't want to have to cd to the right folder each time, you might want to consider creating a shell alias for sdcli.

If you are using tsch, the way to do this is: alias _aliasname_ _path_. For example :

If you are using bash, the way to do this is: alias _aliasname_=_path_. For example:

By creating an alias, you will be able to use the command sdcli, no matter what directory you are in, for the remainder of your terminal session. You can even add the alias command to your .bashrc (for bash) or .tschrc (for tcsh) in order to have this alias created for you automatically.

BACK TO TOP

Using ssh to connect to a remote computer
  1. Make sure that 'Remote Login' is enabled on the machine you wish to connect to. This feature can be turned on from the 'Sharing' System Preference.
  2. Open Terminal.
  3. Type ssh -l (username) (IP) Example: ssh -l johndoe 127.127.1.10

  4. Note: you can also use ssh user@host. (i.e. ssh johndoe@127.127.1.10)

If your username on the current machine is the same as on the remote machine you can just use ssh host. (i.e. if I am logged into my machine as johndoe, and I wish to ssh into machine b, and my account name on machine b is also johndoe, I can just do ssh 127.127.1.10, rather than ssh johndoe@127.127.1.10.

As well, the ssh host command, ssh's into the machine runs the command and quits, so you can do this for example:

This connects to the host and runs the command.

Note: For this to work, sdcli would need to be in a folder in your $PATH, or there would need to be a shell alias for it.

BACK TO TOP