Hi,

I don't know the reason, but the following has been rejected by 
spam-assassin at sourceforge.net.  
It must not be a spam, and I'll forward it to this ML.
Edward, thank you for following-up this topic!


From: Edward Perry <[email protected]>
To: Roland Schulz <[email protected]>
In-Reply-To: <[email protected]>
Content-Type: multipart/alternative; boundary=Apple-Mail-22--449446615
Mime-Version: 1.0 (Apple Message framework v936)
Subject: Re: [JSch-users] Connection Sharing?
Date: Mon, 29 Mar 2010 22:18:49 -0400
References: <[email protected]>
        <[email protected]>
X-Mailer: Apple Mail (2.936)
X-Spam-Score: -0.5 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
        See http://spamassassin.org/tag/ for more details.
        -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
        sender-domain
        -0.0 SPF_PASS               SPF: sender matches SPF record
        -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes
        verification
        0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature
        1.0 HTML_MESSAGE           BODY: HTML included in message
X-Headers-End: 1NwR2f-0005W2-3Y


--Apple-Mail-22--449446615
Content-Type: text/plain;
        charset=US-ASCII;
        format=flowed;
        delsp=yes
Content-Transfer-Encoding: 7bit

My two sense worth is that:
* never tried it at the ssh level let alone the Java level
* But if this is a fifo or character based device then you would need  
to write C code to create this type of interface

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 addition you could write JNDI interfaces to share the connections  
via RMI (Even more fun technology)


Hope some of this helps, I have dabbled with most of this but have not  
taken it as far as you are interested in going.

On Mar 29, 2010, at 6:05 PM, Roland Schulz wrote:

> Hi,
>
> 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
>
> On Mon, Mar 29, 2010 at 10:21 AM, Lisa Woodring <[email protected] 
> > wrote:
> Is there a way to do connection sharing?
>
>
> Something like this:
>
>
> if ! ssh -S /dev/shm/ssh-foo -O check <host> 2> /dev/null; then
>
>    rm -f /dev/shm/ssh-foo
>
>    ssh -S /dev/shm/ssh-foo -fMN <host>
>
> fi
>
>
> ssh -S /dev/shm/ssh-foo <host> <command>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; 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
>
>
>
>
> -- 
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
> ------------------------------------------------------------------------------
> Download Intel&#174; 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


--Apple-Mail-22--449446615
Content-Type: text/html;
        charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; ">My two sense worth is =
that:<div>* never tried it at the ssh level let alone the Java =
level</div><div>* But if this is a fifo or character based device then =
you would need to write C code to create this type of =
interface&nbsp;</div><div><br></div><div>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. &nbsp;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.</div><div><br></div><div>The basic code for executing a =
command or file transfer shows you the =
steps.</div><div><br></div><div>Open a connection, then open a Channel. =
The Channel level would be where you would share the =
connections</div><div><br></div><div>In addition you could write JNDI =
interfaces to share the connections via RMI (Even more fun =
technology)</div><div><br></div><div><br></div><div>Hope some of this =
helps, I have dabbled with most of this but have not taken it as far as =
you are interested in going.&nbsp;</div><div><br><div><div>On Mar 29, =
2010, at 6:05 PM, Roland Schulz wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>Hi,</div><div><br></div><div>as far as I know it is =
not possible.</div><div><br></div><div>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?</div> =
<div><br></div><div>Roland<br><br><div class=3D"gmail_quote">On Mon, Mar =
29, 2010 at 10:21 AM, Lisa Woodring <span dir=3D"ltr">&lt;<a =
href=3D"mailto:[email protected]";>[email protected]</a>&gt;<=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div lang=3D"EN-US" =
link=3D"blue" vlink=3D"purple"> <div><p class=3D"MsoNormal">Is there a =
way to do connection sharing?</p><div>&nbsp;<br =
class=3D"webkit-block-placeholder"></div><p class=3D"MsoNormal">Something =
like this:</p><div>&nbsp;<br =
class=3D"webkit-block-placeholder"></div><p>if ! ssh -S /dev/shm/ssh-foo =
-O check &lt;host&gt; 2&gt; /dev/null; then</p><p>&nbsp;&nbsp; rm -f =
/dev/shm/ssh-foo</p><p>&nbsp;&nbsp; ssh -S /dev/shm/ssh-foo -fMN =
&lt;host&gt;</p><p>fi</p><div>&nbsp;<br =
class=3D"webkit-block-placeholder"></div><p>ssh -S /dev/shm/ssh-foo =
&lt;host&gt; &lt;command&gt;</p><div>&nbsp;<br =
class=3D"webkit-block-placeholder"></div> </div> </div> =
<br>----------------------------------------------------------------------=
--------<br> Download Intel&amp;#174; Parallel Studio Eval<br> Try the =
new software tools for yourself. Speed compiling, find bugs<br> =
proactively, and fine-tune applications for parallel performance.<br> =
See why Intel Parallel Studio got high marks during beta.<br> <a =
href=3D"http://p.sf.net/sfu/intel-sw-dev"; =
target=3D"_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>________________=
_______________________________<br> JSch-users mailing list<br> <a =
href=3D"mailto:[email protected]";>[email protected]=
rge.net</a><br> <a =
href=3D"https://lists.sourceforge.net/lists/listinfo/jsch-users"; =
target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/jsch-users<=
/a><br> <br></blockquote></div><br><br clear=3D"all"><br>-- <br>ORNL/UT =
Center for Molecular Biophysics <a =
href=3D"http://cmb.ornl.gov";>cmb.ornl.gov</a><br>865-241-1537, ORNL PO =
BOX 2008 MS6309<br> </div> =
--------------------------------------------------------------------------=
----<br>Download Intel&amp;#174; Parallel Studio Eval<br>Try the new =
software tools for yourself. Speed compiling, find bugs<br>proactively, =
and fine-tune applications for parallel performance.<br>See why Intel =
Parallel Studio got high marks during beta.<br><a =
href=3D"http://p.sf.net/sfu/intel-sw-dev__________________________________=
_____________">http://p.sf.net/sfu/intel-sw-dev___________________________=
____________________</a><br>JSch-users mailing =
list<br>[email protected]<br>https://lists.sourceforge.net/=
lists/listinfo/jsch-users<br></blockquote></div><br></div></body></html>=

--Apple-Mail-22--449446615--

------------------------------------------------------------------------------
Download Intel&#174; 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