Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

zskillz

martin wrote:


Sorry, I may miss something :-)
If I understand the SSH tunneling, you run some application (like ssh from OpenSSH) that starts listening on certain port and whatever comes there is forwarded to remote port. The only thing the WinSCP needs to do, is to connect to the listening port. That's all. Isn't it?


Sorry! You didn't miss anything - I was thinking about it incorrectly! Everything works perfectly now! :roll: :lol: :lol: I'm not sure what the hell I was thinking about!!!

thanks again Martin, keep up the good work!
-Z
martin

zskillz wrote:

-L port:host:hostport
Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. This works by allocating a socket to be listened port on the local side, and whenever a connection is made to this port, the connection is forwarded over the secure channel and a connection is made to host:hostport from the remote machine. Port forwardings can also be specified in the configuration file. Only root can forward privileged ports.

Sorry, I may miss something :-)
If I understand the SSH tunneling, you run some application (like ssh from OpenSSH) that starts listening on certain port and whatever comes there is forwarded to remote port. The only thing the WinSCP needs to do, is to connect to the listening port. That's all. Isn't it?
zskillz

-L port:host:hostport
Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. This works by allocating a socket to be listened port on the local side, and whenever a connection is made to this port, the connection is forwarded over the secure channel and a connection is made to host:hostport from the remote machine. Port forwardings can also be specified in the configuration file. Only root can forward privileged ports.

manpage of ssh2 = <invalid hyperlink removed by admin>

you may be thinking of the -R switch, but in either case, (unless I'm misunderstanding you) I don't have any control over the remote port at all b/c it's an ssh daemon. The approach I'm taking here is similar to tunneling VNC through ssh for a secure connection. I know this is a little more unconventional, but I don't see a reason why it shouldn't work just the same in theory.
martin

Re: is it possible to choose the source port?

Isn't it that you specify remote (server-side) listen port to -L switch instead of local (client-side) source port?
zskillz

is it possible to choose the source port?

version 3.76
SFTP/SCP
norton commander

Hi Martin,
Thanks in advance for a great product! I use it all the time now and it's fantastic. I appreciate all of the work you put into making the synchronizing capabilities very strong. It has really simplified my life.

Now onto the question. I have a situation that I'm not sure how to get around... In order to gain access to Computer B, I have to ssh tunnel through computer A (it's a security measure that i have no control over). I'd like to be able to use winSCP to graphically interact with computer B. The only way that I can think of to do this would be to forward the source port winSCP is using through computer A (using the -L xxxx:com.put.erB.IP:22 command). Unfortunately, it appears as if winSCP chooses a random port in the high 3000 range, so I can't use the (-L) approach unless i know the source port first. Would it be possible to integrate an option into the parameters that allows one to choose the source port #?

Alternatively, if you can think of a simpler way to do what I'm interested in, I'm definitely up for the suggestions!

thanks,
-Z