prey/prey-bash-client-modules — pull request #11 by pjrobertson (2013-02-22 13:09:18+00:00)
Title: Add an ssh connection function

If set up properly, this function will theoretically open a port from the stolen computer through any firewalls
When setup correctly and a connection made to the remote server, you can SSH from this server using "ssh -p REMOTE_PORT USER@localhost"

This pull request is intended as a 'proof of concept', and as a place to discuss the idea.

Current caveats:

* Requires the user to have a server running SSH (Prey could do this for the user for the 'pro' account?
* Requires the server to be authenticated with the client (SSH keys) -- and these SSH keys must be created for root `$ sudo ssh-keygen`
* Untested on Windows

My idea is that the prey project could have a 'pro' feature which was to simply enable 'ssh connections'.
With this enabled, when the client requests the XML status file from the server, the server would send down details of the SSH host, user, ports etc. to be used.
The client would then setup the connection to the prey server (using the script in this pull)
A prey pro user could then log into the prey control panel and be given an SSH prompt from which they can interact with their lost computer (or Prey could just give the user the details to SSH in themselves)

I think this is a good idea (for the expert user) since even if SSH is allowed and you have the IP of the computer, most modern day routers block incoming traffic on port 22. This is the most reliable way of being able to SSH into the stolen computer'