THIS is how you create SSH shortcuts on a Mac

In: Uncategorized

2 Apr 2010

You want to setup ssh connections so you just search in spotlight for the name, hit enter and you’re logged in? Like the built-in terminal program that comes in OS X and don’t want to find/install some other ssh management tool? Well I did too and this this is how it’s done.

1) edit your ssh config file:

vi ~/.ssh/config

type this in:

Host myServ
Host myServ2
IdentityFile ~/keys/myfile.key

Host is just a nickname or alias for the connection, HostName is the actual hostname. And below that you can put any ssh configuration in for that host that you want. I use it mainly to include an identity file which is normally the -i argument when you ssh on the command line. All the configurations are listed here.

Now that you’ve setup all the params required to make the connection you should be able to ssh on the command line using the alias:

ssh myServ

2) Make a file that spotlight can find.

Open your favorite text editor and type this in ssh://username@alias:

Of course change the username, or just remove it if you want to be prompted for the username.

Now highlight that entire line and drag/drop it into a folder. That will create an inetloc file. Rename that file whatever you want (or leave the filename alone) and it’s now findable in spotlight, you hit enter and you’ll be automatically ssh’ed into your server.

Comment Form

About this blog

Nothing that notable about this blog. It's just going to be a place where we post random stuff.


  • FirstSam: I see you don't monetize your blog, don't waste your traffic, you can earn additional cash every m [...]
  • Arv: In else case it should invoke: super.writeText(writer, text); NOT writer.write(text); [...]
  • Chand: Hi could any one suggest, if few childs should be CDATA and dynamic value... How to get this with X [...]
  • Andrew: This is definitely a great start to the solution I need, but I need CDATA tags to be added dynamical [...]
  • Ed Moore: "solving by explaining" in Greek: επίλυση εξηγώντας . https://translate.googl [...]