title: Listening SSH client
body: <p>I'm looking for an SSH-equivalent (encrypted, terminal access, port forwarding) system where the client side can listen for incoming connections.</p>
  
  <p>There are a number of versions of VNC where the remote end can be started as the listener and is connected to by the machine with the display that is going to be shared.</p>
  
  <p>I'd like to be able to do the same thing with SSH.  Start the client end first and have it listen on a particular port, and then connect to it with the server and share the server's shell with the client.</p>
  
  <p>edit:  For those who are wondering why I would be interested in such a thing:</p>
  
  <p>This is going to be deployed for remote technical support of a consumer-grade network appliance. As such, obtaining login credentials for the system will likely be trivially easy for those with malicious intent. An SSH server is a very powerful application.  Yes, it can be secured in ways to prevent people from misusing access, but you can't get more secure than having the unneeded abilities not exist in the program. You don't have to worry about overlooking an exploit vector or mistyping a configuration in such a way as to leave a hole. A "listening" client would do just that. An attacker's options become severely limited when the majority of the discovered exploits against the system are going to affect <em>their</em> end only.  </p>
  
  <p>My attempts to search for such a thing are confounded by the commonness of the terms, hence why I am asking here. At this point I'm guessing that the easiness of setting up a reverse tunnel has resulted in little interest in such an ability, and so it does not exist. C'est la vie.</p>
  
  <p>In this case, the appliance already involves connection forwarding components. If the answer is "no such thing exists" then we can piggyback it into that in a secure manner; but avoiding that chunk of work would be nice given the large number of other things that also need doing.</p>
  
  <p>Final edit:</p>
  
  <p>Setting up a reverse forward is probably the simplest thing to do for the average person, so I'm going to mark that as the answer.  I'm pretty sure it would be possible to use the Python Twisted framework's ssh capabilities to build a system that implements a listening client, but since the application I'll be using this to support already involves NAT traversal and port forwarding it's easier for me to use that.</p>
  
  <p>If anybody stumbles across this question who wants a "backward" SSH server, feel free to leave a comment and, depending on my available time, I'll either build one, or put you in touch with someone who can build one for you.  The connection part is pretty easy, it's figuring out how to share the shell across it that's trickier than I currently have time for.</p>