Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got a link (in Chrome) that looks like in Ubuntu 11:

ssh://deploy@ec2-snip.amazonaws.com

When I click on it, nothing happens. I can ssh into the instance successfully. But when I click on this link, I get a dialog box for an "External Protocol Request", then I click "Launch Application" and then nada. Is there something I need to setup to get the ssh:// links to work in Ubuntu?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You will need to write a script to handle the ssh://

Put this in ~/bin/firefox-ssh.sh

#!/bin/bash
address=`echo $1 | cut -d / -f 3`
port=`echo $1 | cut -d / -f 4`
if [ "$port" == "" ]; then
    port=22
fi
ssh ${address} -P ${port}

make it executable

chmod a+x ~/bin/firefox-ssh.sh

Then set with

gconftool-2 -s /desktop/gnome/url-handlers/ssh/command '/home/your_user/bin/firefox-ssh.sh %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/ssh/enabled --type Boolean true
gconftool-2 -s /desktop/gnome/url-handlers/ssh/needs_terminal --type Boolean true

Modified from this thread on the ubuntu forums.

share|improve this answer
    
Does this answer change if I'm using chrome? I followed your steps but just changed "firefox" to "chrome". Relaunched chrome. Clicked link. Nothing. –  jcollum Dec 23 '11 at 20:56
    
Tried the same link in firefox and it said "Firefox doesn't know how to open this address..." –  jcollum Dec 23 '11 at 21:09
    
In firefox, go to about:config , Right click New -> Create Boolean -> add in network.protocol-handler.expose.ssh = false Firefox should then ask what application to use, try using /usr/bin/xdg-open –  bodhi.zazen Dec 23 '11 at 21:40
    
Did that, it asked me what to use, selected xdg-open, then nothing happened. Hmm. Stuck. –  jcollum Dec 23 '11 at 22:00
    
Nope, same result. Man this is a tough one eh? Thanks for the assist either way. –  jcollum Dec 23 '11 at 22:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.