> as far as I know it is not possible.

> 

> But I would also be interested in this feature. I would think it shouldn't
be too difficult to add. Is this something which could be ?
> added to jsch?

> 

> Roland

I agree.  Would love to see this added as a feature.

 

> From: Edward Perry [mailto:[email protected]] 

> 

> However, JSCH can establish 1 connection and then you can open multiple
sessions with in that. I have done it but you have to
> really know your Java Threading to maintain all the different connections
to a single server.  So it would be possible to tranfer a file,
> issue a command and tail a log file on a single TCP connection but in
multiple sub channels.

> 

> The basic code for executing a command or file transfer shows you the
steps.

> Open a connection, then open a Channel. The Channel level would be where
you would share the connections

> 

 

In my case, all connections are peers & I have no way of knowing who should
open the initial connection.  I'm using Ant's "sshexec" task to execute
commands on a remote machine.  A command is executed when an HTTP request is
made by a user.   I'm currently using jsch/Ant-sshexec & opening a new ssh
connection for each command.  I wanted to take advantage of the connection
sharing mode of ssh to speed things up & only open a connection on the 1st
command toward a particular remote machine.  I'm currently re-writing the
code to skip both jsch & ant's sshexec task - and just call native "ssh"
commands via "Runtime.exec()".  Not the cleanest obviously, but in my case,
the code only resides on our web servers - which we know to be Linux with
ssh installed - so the speed improvement is worth it.  If anyone has any
other ideas, I'd love to hear them.

 

Thanks,

-- Lisa

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to