Welcome to Machine Unix

Search Below

How to Use Alfred App to Scp Files to Your Joyent SmartMachine

My own blog runs on a Joyent SmartMachine, and I generally find myself uploading bunch of files to my SM. Sure you can use bunch of clients like Cyberduck, Transmit, etc. I’d like to just use plain old scp command on the terminal.

I recently had an idea that since I use and love Alfred app a lot, why not just create an extension for it. The extension actually applies all kinds of servers but you will need to get around supplying password in the shell script. Well, I don’t like that!. By using private/public ssh key mechanism, you can just access your machine. If you are not familiar with the terms, you can look here for Joyent related info, and here to create your own public/private keys.

If you are using Joyent Smartmachine, you are in luck with this extension, all you need to do is to replace your server name, etc and you should be good to go. I should also mention that the script is really basic and it is written in bash.

So there are couple of assumptions being made in the script which I also commented in the file. For example, your default local location for your files is your desktop and the script assumes that you created a remote folder in the server to save your files.

You will see “sc” as your tag for the Alfred app and all you need to do is to provide the name of the file or the folder you want to upload next to it.

Growl notifies you when the scp job is finished or it informs you if the file or the folder does not exist.

You are welcome to improve this extension and let me know what you come up with. I am interested to see what people can share.

Following are the screenshots when you want to upload your files using scp through Alfred.

AlfredSC

The growl notification can be seen as follows:

AlfGrowl-300x97

From the remote server, I can see the following now:

[jill@machine-unix ~/Dropzone]$ ls -l
total 2
-rw-r–r– 1 jill jill 142 Mar 7 04:41 mypics.zip

You can download the file here.

The icon used for this extension is downloaded from another website I really like. Check out deviantART site, and the icon set link.

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>