After talking with xsb about his last post on using dmenu to launch SSH sessions, I decided to give it a try.

As I then suggested him, I prefer to show on dmenu the entries I have in my ~/.ssh/config file, so I don't have to maintain two files and to reuse the already done config for each host.

What I've ended up with is the following script (which I've stored in ~/bin as sshmenu, which is in my $PATH):

#!/bin/bash
 
urxvt -e ssh `cat ~/.ssh/config | grep ^host | awk '{ print $2 }' | dmenu`

To make it still more usable I've assigned a shortcut to my rc.lua aweseome's config file:

...
awful.key({ modkey, "Shift"   }, "s", function () awful.util.spawn('sshmenu') end),
...

Tagged as dmenu, ssh, awesome

If you liked this post, you can donate using Bitcoin 12jVrWkk5S6x5hEizThZwgTx59KxaDdK4C