Leave feedback
  • Question

    Using HTTP Submit via SSH gateway

Enter a new topic
  • Jon Jonsson Jon Jonsson
    0 likes 952 views

    Hi,

    I want to use HTTP Submit where there webservice to be used is placed behind a SSH gateway. Is this possbile, in any way? Any likely experience out there?

    BR
    Jon Jonsson, Sogeti

    Thursday 09 January, 2014
  • Best Answer
    Jon Jonsson Jon Jonsson
    1 likes

    Hi again,

    I was able to solve this by using some tricks with the telnet and SSH client 'Putty'. I am sure that the solution can be much more sofisticated. However, the solution described below works fine in my lab environment.

    Let us say that you have a the following:

     

    • A SSH Gateway at a LINUX host with IP '123.456.78.9' port '22' and login/pwd 'sshlogin'/'sshpwd'.
    • A LINUX host where the webservice exist with IP '987.654.32.1' port '23' with login 'wslogin'/'wspwd'.
    • A webservice at the LINUX host (as above) with IP '987.654.32.1' port '8155'.
    • A WINDOWS host where StreamServe is running with IP '999.999.99.9'.

     

    To be able to reach the web service from host the STRS host (999.999.99.9), you need to open up a tunnel (or in fact a tunnel and then a tunnel in the tunnel). Perform the following steps:

     

    • Download Putty.
    • Start Putty
    • In the left tree, go to 'Session' and specify '123.456.78.9' as host and '22' as port. Use SSH as connection type.
    • Go to 'Connection-SSH-Tunnels'.
    • In 'Source port', insert '1234'.
    • In 'Destination', insert '987.654.32.1:23'.
    • Ensure that 'Local' port is marked.
    • Enter 'Add' (the new forwared ports should apply in the small window above).
    • Go to 'Session' again and make a save of the session with name 'Tunnel-1'.
    • Click 'Open' and login with the credentials 'sshlogin'/'sshpwd'.
    • Start Putty again.
    • In the left tree, go to 'Session' and specify 'localhost' as host and '1234' as port. Use SSH as connection type.
    • Go to 'Connection-SSH-Tunnels'.
    • In 'Source port', insert '9876'.
    • In 'Destination', insert '987.654.32.1:8155'.
    • Ensure that 'Local' port is marked.
    • Enter 'Add' (the new forwared ports should apply in the small window above).
    • Go to 'Session' again and make a save of the session with name 'Tunnel-2'.
    • Click 'Open' and login with the credentials 'wslogin'/'wspwd'.

     

    Now it should be able to reach the webservice from the StreamServe host ('999.999.99.9'), as normal. The only exeception is that instead of using host and port '987.654.32.1:8155' for the webservice, you have to use 'localhost:9876'.

    Since the Putty sessions above are saved, you can reopen them when necessary (after reboot etc). Note that they need to be opened in the same order as above.

    I hope that above is farily understandable. If not, please make a note in this topic.

    BR
    Jon Jonsson
    Sogeti

    Tuesday 14 January, 2014
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    I am by no means a shark at this but my guessing is that you need to create a tunnel to the SSH Gateway from the Strs host. There are many tunnel tools out there. Stunnel..... for example.

    There are probably many technical steps involved whilst building this (gnerating keys and swapping them) - so get some help - ideally to sit next to you when you do it.

    AND THEN LET US KNOW HOW YOU DID IT!!!!

    Thursday 09 January, 2014
  • Jon Jonsson Jon Jonsson
    0 likes

    Hi Vyv,

    Yes, in fact I (almost in this moment) got some help from a collegue here so set up a tunnel using putty (I did not know that, but putty actually has functionality for that). It looks good so far, now I am waiting for the customer to send me login and password for the webservice to be tested.

    Later when/if I have a working solution, I will update this topic with details.

    To be continued...

    BR
    Jon

     

    Thursday 09 January, 2014
  • Jon Jonsson Jon Jonsson
    1 likes

    Hi again,

    I was able to solve this by using some tricks with the telnet and SSH client 'Putty'. I am sure that the solution can be much more sofisticated. However, the solution described below works fine in my lab environment.

    Let us say that you have a the following:

     

    • A SSH Gateway at a LINUX host with IP '123.456.78.9' port '22' and login/pwd 'sshlogin'/'sshpwd'.
    • A LINUX host where the webservice exist with IP '987.654.32.1' port '23' with login 'wslogin'/'wspwd'.
    • A webservice at the LINUX host (as above) with IP '987.654.32.1' port '8155'.
    • A WINDOWS host where StreamServe is running with IP '999.999.99.9'.

     

    To be able to reach the web service from host the STRS host (999.999.99.9), you need to open up a tunnel (or in fact a tunnel and then a tunnel in the tunnel). Perform the following steps:

     

    • Download Putty.
    • Start Putty
    • In the left tree, go to 'Session' and specify '123.456.78.9' as host and '22' as port. Use SSH as connection type.
    • Go to 'Connection-SSH-Tunnels'.
    • In 'Source port', insert '1234'.
    • In 'Destination', insert '987.654.32.1:23'.
    • Ensure that 'Local' port is marked.
    • Enter 'Add' (the new forwared ports should apply in the small window above).
    • Go to 'Session' again and make a save of the session with name 'Tunnel-1'.
    • Click 'Open' and login with the credentials 'sshlogin'/'sshpwd'.
    • Start Putty again.
    • In the left tree, go to 'Session' and specify 'localhost' as host and '1234' as port. Use SSH as connection type.
    • Go to 'Connection-SSH-Tunnels'.
    • In 'Source port', insert '9876'.
    • In 'Destination', insert '987.654.32.1:8155'.
    • Ensure that 'Local' port is marked.
    • Enter 'Add' (the new forwared ports should apply in the small window above).
    • Go to 'Session' again and make a save of the session with name 'Tunnel-2'.
    • Click 'Open' and login with the credentials 'wslogin'/'wspwd'.

     

    Now it should be able to reach the webservice from the StreamServe host ('999.999.99.9'), as normal. The only exeception is that instead of using host and port '987.654.32.1:8155' for the webservice, you have to use 'localhost:9876'.

    Since the Putty sessions above are saved, you can reopen them when necessary (after reboot etc). Note that they need to be opened in the same order as above.

    I hope that above is farily understandable. If not, please make a note in this topic.

    BR
    Jon Jonsson
    Sogeti

    Tuesday 14 January, 2014
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    Fantastic!

    Tuesday 14 January, 2014