Reverse SSH From Anywhere is a project for allowing a user to ask the when-he-need creation of a SSH tunnel from a machine located behind a NAT or located on a network where a firewall does not accept incoming connection to a machine visible on the Internet, in order to make then a reverse SSH (using ssh login@localhost -p bridge_port).
We call:
A big restriction of the tool: the SSH host key of the destination machine must already be in the .ssh/known_host of the server.
The project use an external XMPP/Jabber server (for now the gtalk servers from Google, i.e. talk.google.com, but the code can be easily augmented to use an another Jabber server that allows SSL connections on the port 443).
In addition to the connection to the XMPP/Jabber server using SSL, all the dialog is encrypted using PGP public/private keys with the RSA cipher, so no information transit in clear on the Google servers or Jabber servers.
openssh-server is installed on the server and the destination machine, and sshpass on the server$gpg --gen-key) (after that, the pubring.gpg and the secring.gpg files are in ~/.gnupg)server-config.properties in the same directory of RSSHFAServer.jar containing the configuration of the server and the list of gtalk identifiers that are authorized to talk with the server (see the example file in the project archive)pubring.gpg previously generated on the server$java -jar RSSHFAClient.jar -c me@gmail.com server@gmail.com ip bridge_port login pubring_filepath$ssh login@localhost -p bridge_port$java -jar RSSHFAClient.jar -k me@gmail.com server@gmail.com (this kill all your created SSH tunnels)sshpass or a ssh process you kill also the RSSHFAServer.This project use the Smack library from IgniteRealtime released under the Apache license, and the BouncyCastle library released under the MIT X Consortium license, the OpenPGP library of BouncyCastle also includes a modified BZIP2 library under the Apache Software License, Version 1.1.
Reverse SSH From Anywhere is under the GPLv3 license.
Copyright © 2009, Nicolas James.
http://njames.trevize.net/wiki/projects:reversessh_from_anywhere
~~DISCUSSION~~