0

I'm trying to test and distribute my python application in script or executable form (client). I already have my openshift server setup and running. I'm confused on setting up port forwarding with other users to test it out with.

Do other clients (publicly) need to download rhc and run 'rhc port-forward appname' on their own machine or are there alternatives out there which can be accomplished using python internally by code?

This is kind of confusing and any help would be much appreciated.

Thanks.

timo.rieber
  • 3,727
  • 3
  • 32
  • 47
scottyp
  • 295
  • 1
  • 4
  • 13

1 Answers1

0

all the 'rhc port-forward appname' does is set up SSH tunnels behind the scenes. If you want people to tunnel into your appication you will need to get their public SSH key into your application as an approved key. Then you can set up an SSH tunnel whatever way you chose.

TheSteve0
  • 3,530
  • 1
  • 19
  • 25
  • Thanks TheSteve0, So do I just use a ssh tunnel framework in python like [**this**](https://pypi.python.org/pypi/sshtunnel/0.0.1) supply the public keys in openshift then it will replicate the same feature in rhc? Can you give a basic example? – scottyp Dec 27 '14 at 09:02
  • I'm trying to use this [**ssh forwarding demo**](https://github.com/paramiko/paramiko/blob/master/demos/forward.py) using python sshtunnel and paramiko to replicate the rhc ssh port forwarding that you mentioned, can't figure out what ssh server and port to use. Am I close on getting this to work? – scottyp Dec 27 '14 at 11:23
  • I got it to work now using the demo code above! Thanks again for the tip and info on ssh tunneling. :) – scottyp Dec 27 '14 at 12:36