ssh:// protocol handler
I finally broke down and configured an ssh:// protocol handler so that I could create ssh:// links in web pages that open my ssh client, much like mailto:// opens my MUA
Below is how I did this on Ubuntu Linux running Xfce.
-
Register the x-scheme-handler/ssh with xdg-mime.
xdg-mime default ssh.desktop x-scheme-handler/ssh
-
Create the ~/.local/share/applications/ssh.desktop launcher.
[Desktop Entry] Version=1.0 Name=SSH Launcher Exec=xterm -e '(URL="%U"; ssh ${URL##*/}) || bash' Type=Application Terminal=false Icon=utilities-terminal
-
Reconfigure the GVFS daemon to not intercept ssh:// URIs by commenting out (#) the SchemeAliases=ssh line.
sudoedit /usr/share/gvfs/mounts/sftp.mount
- HUP the gvfsd process (running as your user).
-
The following command should open an XTerm that launches an ssh to hostname.
xdg-open ssh://localhost
- Restart your web browser / application.
-
Go to an ssh:// URI
ssh://localhost
- Select "SSH Launcher" from the pop-up window. Optionally, check remember.
- Create links that use the ssh:// URI and Profit!!!
As a bonus, since the ssh:// protocol handler is simply calling the OpenSSH client, ssh, all of the tweaks to the ~/.ssh/config file apply. Inlcuding SSH Canonicalization.:-)
I have not tested this yet, but I believe I could make additional handlers for just about anything that I wanted to do.