Establish SSH Connection Between Two Isolated Machines Using a 3rd System

Posted by FurryHead on Stack Overflow See other posts from Stack Overflow or by FurryHead
Published on 2011-01-13T22:33:48Z Indexed on 2011/01/13 22:53 UTC
Read the original article Hit count: 130

Filed under:
|
|
|

I'd like to do the following with Python:

  1. Computer 1 starts SSH server (probably using twisted or paramiko)
  2. Computer 1 connects to Server 1 (idle connection)
  3. Computer 2 connects to Server 1
  4. Server 1 forwards Computer 2's connection to Computer 1 (connection no longer idle)
  5. Computer 1 forwards Server 1's connection to listening SSH port (on computer 1)

Result being Computer 2 now has a SSH session with Computer 1, almost as if Computer 2 had started a normal SSH session (but with Server 1's IP instead of Computer 1's)

I need this because I can't port forward on Computer 1's network (the router doesn't support it).

© Stack Overflow or respective owner

Related posts about python

Related posts about networking