ssh tunnelling with Telepathy and ssh-contact

I needed to connect remotely to my brother's computer to help him fix something, in the past I relied on the X Windows protocol for these things: the people I was helping just needed to open a remote xterm on my screen (with $ xterm -display my.public.ip.address:0.0) to let me operate on their system , it was insecure —no encryption in the communication— but it was one simple command for them to copy and paste as I were putting on my end all the boring details about port forwarding and access control, but this time I wanted to try something different.

Since I use the Empathy client which is based on the Telepathy framework, I looked for a Telepathy-based solution and I found ssh-contact, it allows you to ssh to your IM contacts which is kinda slick if you ask me.

Prerequisites:

  • both parties must use an IM client based on Telepathy; for instance there is Empathy in GNOME, but I understand that Maemo and Meego devices base their IM client on it too, and so does the OLPC project;
  • both parties must use a connection manager which supports Telepathy Tubes, so far only the XMPP one does;
  • both need to install the ssh-contact package;
  • the client side needs an ssh client, and an account on the remote machine;
  • the server side —my brother's PC in this case— must have an ssh server running, listening at least on 127.0.0.1

Most of these prerequisites were already in place in our case, so for me it was just a matter of:

$ sudo aptitude install ssh-contact
$ ssh-contact 
1) jabber (ao@jabber.linux.it) (jabber)
Which account to use? 1
1) Brother (brother@some.xmpp.server)
Which contact to use? 1

To avoid interactive mode, you can use that command:
ssh-contact --account /org/freedesktop/Telepathy/Account/gabble/jabber/ao_40jabber_2elinux_2eit0 --contact brother@some.xmpp.server 
ao2@brother@some.xmpp.server's password:

It is also possible to use a non-interactive mode and pass options to the ssh client:

$ ssh-contact --account /org/freedesktop/Telepathy/Account/gabble/jabber/ao_40jabber_2elinux_2eit0 \
              --contact brother@some.xmpp.server \
              -- -X $OTHER_SSH_OPTIONS

passing for instance -X enables X forwarding over SSH which makes possible to open remote graphical programs on the local screen, if the server supports that.

Take in mind that currently ssh-contact exposes you ssh server to any of your contacts, there is no whitelisting mechanism, you've been warned. :)


CommentsSyndicate content

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3
n
V
A
L
Q
Enter the code without spaces.