Open SSH connection on specific network interface

2019-07-31 01:25发布

How can I configure JSch client to communicate using network interface other than default one?

2条回答
Viruses.
2楼-- · 2019-07-31 01:50

You can implement the SocketFactory interface to create a custom socket with a specified source interface, and then use session.setSocketFactory(...) to plug it into your JSch session.

查看更多
狗以群分
3楼-- · 2019-07-31 01:53

I do not think that it is possible. I have the same requirement and checked the source code provided along with JSch. The plain Socket is created without a local address or port.

查看更多
登录 后发表回答