Is JSch SSH session channel a separate TCP connection? -


i have files uploaded sftp server, use jsch accomplish goal.

i have these options implementation:

  1. jsch opens 1 session , 1 channel

  2. jsch opens 1 session , multiple channels

the above 2 solutions, more efficient?

does 1 session correspond tcp connection, or 1 channel correspond tcp connection?

if 1 session corresponds tcp connection, multiple channels must share same tcp connection, can more efficient?

one ssh session corresponds 1 tcp connection. channel virtual "connection" within 1 ssh/tcp connection.

as have rightly assumed, can hardly more efficient use multiple channels.

option use multiple channels not efficiency, flexibility (imo).


actually using multiple channels can less efficient.

it depends on how efficiently ssh parties implement ssh flow control (sliding window), comparing efficiency of tcp flow control (which super-optimized).

some sftp clients, when know 1 channel opened, deliberately set client-side ssh window huge number, leave flow control tcp (expecting more efficient).

also, putty-based sftp clients (like psftp or winscp) announce server ever use 1 channel (using proprietary simple@putty.projects.tartarus.org message), server can opt leave flow control tcp too. not know of ssh server take advantage of this.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -