LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-03-2007, 03:33 PM   #1
bagpussnz
Member
 
Registered: Aug 2003
Posts: 54

Rep: Reputation: 15
Enable ssh://host links in firefox


Hi,
I have a web page (call center) that gives me pages with ssh://hostname links in them.
When I open them in firefox I get the dialog,

Firefox doesn't know how to open this address, because the protocol (ssh) isn't associated with any program.

Does anyone know how to set up firefox to enable this?

Regards,
Ian Collins.
 
Old 09-03-2007, 05:46 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I wonder why a website should open an ssh connection, and not simply give instructions for using the command line. Anyway, I don't know if firefox has some add-on to handle ssh connections, but you can easily create a script which opens a terminal and launch a ssh session from there, e.g.
Code:
#!/bin/bash
url=$1
protocol=${url//:*/}
machine=${url//*:\/\//}
machine=${machine%/}
/usr/bin/gnome-terminal -e "$protocol $machine"
Here, some string manipulation is done to retrieve protocol (ssh) and hostname from the URL. Then it will open a terminal which executes the ssh command. In this example I have choosen gnome-terminal, but depending on your desktop manager you can choose another one (i.e. konsole or xterm).
Then in firefox user preferences set things to handle ssh protocol by means of this script. For example, in about:config you can add a new string
Code:
network.protocol-handler.app.ssh
and give the value
Code:
/path/to/the/script.sh
Please note: I don't know about security risks for such a kind of procedure, but I hope this will help a little.

Last edited by colucix; 09-03-2007 at 05:52 PM.
 
Old 09-03-2007, 09:20 PM   #3
bagpussnz
Member
 
Registered: Aug 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks. BTW - the reason is that our support staff use windows. The call centre database has links to get to customer sites - so they click on the ssh://host link and it opens putty and takes them there.

You reply is just what I wanted - it was the network.protocol-handler.app.ssh bit I was after.

Many thanks,
Ian.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh + pop3 with kmail: Could not connect to host localhost, but ok without ssh Emmanuel_uk Linux - Networking 0 07-20-2006 04:56 PM
How to enable Outlook Express Mail Checking from Firewall Host wintoe Linux - Networking 3 08-20-2005 08:57 PM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 05:28 PM
how to enable host name lookup in Redhat 9.0? htm Linux - Software 5 05-05-2004 07:59 AM
SSH Links Problem With libpam dogn00dles Linux - Networking 2 10-21-2003 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration