Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #23141

Re: POST to secure server

Newsgroups comp.lang.java.programmer
Date 2013-03-27 08:39 -0700
References <c3c53dbd-b60d-4a93-95ea-d6bf653037aa@googlegroups.com>
Message-ID <87e45e09-ad58-4bf1-87d4-d5b6c1916645@googlegroups.com> (permalink)
Subject Re: POST to secure server
From RVic <rvince99@hotmail.com>

Show all headers | View raw


Silvio, Thank you -- but  I am a little confused by what you say. Right now, using JSCH I can connect with:

JSch jsch = new JSch();	
Session session = jsch.getSession("me"/*user*/, "moonprod"/*serverURL*/);		
session.setPort(22);
session.setPassword(password);
session.connect();

And the servlet I must reach is on Tomcat on the server on port 28080 which would be hit as http://moonprod:28080/servlets/myservlet
What are you saying, below, that I should change? Thank you!



<<If you setup a tunnel using JSCH (which requires adding an addition
connection property string to the connection that specifies the server
destination host:port and the local port on the client side then any
communication going through localhost:port on the client will be
tunnelled via SSH and reach the destination host:port on the server side.
So assuming that there is an existing servlet on the server side that is
listening for HTTP requests on port 80 on the same box you make the SSH
connection to you server host:port would be localhost:80 and you could
use any desired port on the client side, lets say 8080. After that you
can use new URL("http://localhost:8080/path/to/the/servlet/") and do a
normal post from the client. The tunnel will automagically make your
request reach the servlet. >>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

POST to secure server RVic <rvince99@hotmail.com> - 2013-03-26 04:46 -0700
  Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-26 13:43 +0000
  Re: POST to secure server markspace <markspace@nospam.nospam> - 2013-03-26 09:51 -0700
  Re: POST to secure server Roedy Green <see_website@mindprod.com.invalid> - 2013-03-26 19:00 -0700
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-27 05:34 -0700
    Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-27 13:07 +0000
    Re: POST to secure server Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-03-27 20:11 -0300
      Re: POST to secure server markspace <markspace@nospam.nospam> - 2013-03-27 19:38 -0700
      Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-28 08:49 +0000
        Re: POST to secure server Silvio <silvio@internet.com> - 2013-03-28 10:17 +0100
        Re: POST to secure server Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-03-28 06:19 -0300
          Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-28 09:54 +0000
            Re: POST to secure server Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-03-28 20:51 -0300
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-27 06:24 -0700
  Re: POST to secure server Silvio <silvio@internet.com> - 2013-03-27 14:37 +0100
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-27 06:45 -0700
    Re: POST to secure server Silvio <silvio@internet.com> - 2013-03-27 15:08 +0100
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-27 08:39 -0700
    Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-27 17:30 +0000
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-27 13:26 -0700
    Re: POST to secure server Silvio <silvio@internet.com> - 2013-03-28 10:05 +0100
    Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-28 10:34 +0000
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-03-28 05:02 -0700
    Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-28 12:22 +0000
  Re: POST to secure server RVic <rvince99@hotmail.com> - 2013-04-02 07:07 -0700
    Re: POST to secure server Silvio <silvio@internet.com> - 2013-04-02 22:39 +0200
    Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-03 10:39 +0100
      Re: POST to secure server Joerg Meier <joergmmeier@arcor.de> - 2013-04-03 15:32 +0200
        Re: POST to secure server lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-03 15:34 +0100

csiph-web