SSH Protocol Handling

To open URLs like: ssh://user@hostname.com
Check to see if ssh protocol handler is already set:
xdg-mime query default x-scheme-handler/ssh
Create desktop entry (.desktop file) for ssh handler:
cat << EOF > ~/.local/share/applications/ssh-handler.desktop
[Desktop Entry]
Name=SSH Handler
GenericName=SSH Handler
Comment=Open ssh URLs - ssh://user@hostname
Version=1.0
Exec=bash -c '(URL="%U" HOST="\${URL:6}"; ssh \$HOST); bash'
Terminal=true
Type=Application
Icon=utilities-terminal
MimeType=x-scheme-handler/ssh;
Keywords=ssh;protocol
EOF
Set default ssh handler:
 xdg-mime default ssh-handler.desktop x-scheme-handler/ssh
Now open URL from browser. Done!

awk (1) cryptsetup (1) dd (2) device (1) drive (1) encryption (2) ext (1) filesystem (1) firefox (1) grep (1) loop-back (1) losetup (1) mkfs (1) mount (1) protocol-handler (1) security (2) sed (1) ssh (3) stat (1) truncate (1) urandom (1)

Leave a comment

Your email address will not be published. Required fields are marked *