I have a series of linux based internet kiosks at a variety of sites. I need to be able to connect back into the kiosk from the main server. However direct connections aren't possible as kiosks are behind there own router/firewall.
The solution to this is to forward port 22 on the kiosk to a port on the server. I was thinking of just spawning the command "ssh -R11122:my_server:22 user@my_server" from the kiosk, when ever I need to connect to a machine. However I'm hoping to do this with twisted, since the kiosk app uses it already, and spawning the ssh command won't play well with twisted's event system.
I decided to try and hack together a simple version of what I want to do, based on the example sshsimpleclient.py. I don't seem to be able to figure out how to forward from the server to the kiosk. My program (attached) just forwards from 11122 on the kiosk to 22 on the server which isn't what I want.
Can anyone suggest what I'm doing wrong? Can twisted actually do this?
Thanks in advance,
-- Oisin Mulvihill Engines Of Creation
Email: email@example.com Email: firstname.lastname@example.org Mobile: +353 868191540