开发者

How can I enable passive mode while using JSch as SFTP client?

开发者 https://www.devze.com 2023-03-03 07:04 出处:网络
I\'m using JSch as SFTP client and now I need to enable passive mode because of some limitation of sec开发者_C百科urity.

I'm using JSch as SFTP client and now I need to enable passive mode because of some limitation of sec开发者_C百科urity.

But I can not found a way to enable passive mode.

Can somebody tell me how to do this?


"Passive mode" is a specialty of the FTP protocol.

In normal FTP mode for each individual file the client listens on a port and the server has to connect to this. As many firewalls support only outgoing connections, there was added the passive mode - here the client connects to the server for the individual files.

SFTP is a totally independent protocol from FTP - it also supports file transfer over a network, but this is already the end of the similarities. Everything (both commands and data) is transferred in the same SFTP channel, which in turn usually (and certainly if using JSch), is part of an SSH connection, which is transported over TCP. This single TCP connection is always started by the client, thus there should be no problem with firewalls, if they don't block SSH completely.

If you have a problem with your "limitation of security" (whatever this it), it certainly does not depend on SFTP modes here. If you add the necessary information to your question, we can maybe help you here.


SFTP protocol has no passive mode - it runs everything (commands and data) over one established connection.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号