Net::SSH fails on second retry over remote tunnel

B

Brian Madden MD

Hello-

Please pardon me if I'm na=EFve, this is my first post.

I'm working on enabling DRbSSL to tunnel through an SSH connection.

My setup is that the "client" runs a DRbSSL service, which starts, and =
then
NetSSH is used to perform a client login to the remote host server, and =
then
sets up a remote_to port forward, so that when the host server wants to
contact the client, it can send a "drbssl://localhost:remote_port" =
command
to itself which should forward through the tunnel to the client drbssl
service.

To clarify:
On the client computer: drbssl://0.0.0.0:12321 (local blocked port that =
it
is listening on)
This is tunnelled to the host server with a forwarded remote port of =
16000,
by logging into SSH and setting the forward.
On the remote computer: drbssl://localhost:16000 responds with the =
client's
DRB service.


Here's my problem:

The client DRB installs and sets up just fine. No problem.
When I make the FIRST call, from the host server, =
drbssl://localhost:16000,
it works.
When I make a SECOND call, to the same address, it hangs and then dies =
with
the error that "a request to send or receive data was disallowed because =
the
socket had already been shutdown in that direction with a previous =
shutdown
call."

First, I'm using OpenSSH for Windows (windows server 2003, sorry), but I
also confirmed this on CopSSH using a second server (also Windows, w2k) =
-
same error. My Net::SSH and OpenSSH are up to date.=20

I've tried several methods of fixing this, from reconfiguring my =
sshd_config
file, to trying different methods of the Net:SSH session loop, with no =
luck.
It does not seem to matter how I connect to localhost:16000.

The issues I think might be relevant:
- why does Net::SSH close the socket after forwarding data? Is this a
Windows problem?
- Or is my problem that Drb is sending some kind of stop signal that
Net::SSH is interpreting as a closed session?
- Or should I avoid Net::SSH and use Putty or some other SSH client to
create the tunnel?

I can post my scripts and/or sshd_config on request, not sure if that is
going to be useful. I might also ask for help in how to ssh debug, as =
I'm
sure that might be revealing but I haven't figured out how to read the
active ssh log file (!). =20

Thanks-
Brian Madden
 
H

hemant

Hello-

Please pardon me if I'm na=EFve, this is my first post.

I'm working on enabling DRbSSL to tunnel through an SSH connection.

My setup is that the "client" runs a DRbSSL service, which starts, and th= en
NetSSH is used to perform a client login to the remote host server, and t= hen
sets up a remote_to port forward, so that when the host server wants to
contact the client, it can send a "drbssl://localhost:remote_port" comman= d
to itself which should forward through the tunnel to the client drbssl
service.

To clarify:
On the client computer: drbssl://0.0.0.0:12321 (local blocked port that i= t
is listening on)
This is tunnelled to the host server with a forwarded remote port of 1600= 0,
by logging into SSH and setting the forward.
On the remote computer: drbssl://localhost:16000 responds with the clien= t's
DRB service.


Here's my problem:

The client DRB installs and sets up just fine. No problem.
When I make the FIRST call, from the host server, drbssl://localhost:1600= 0,
it works.
When I make a SECOND call, to the same address, it hangs and then dies wi= th
the error that "a request to send or receive data was disallowed because = the
socket had already been shutdown in that direction with a previous shutdo= wn
call."

First, I'm using OpenSSH for Windows (windows server 2003, sorry), but I
also confirmed this on CopSSH using a second server (also Windows, w2k) -
same error. My Net::SSH and OpenSSH are up to date.

I've tried several methods of fixing this, from reconfiguring my sshd_con= fig
file, to trying different methods of the Net:SSH session loop, with no lu= ck.
It does not seem to matter how I connect to localhost:16000.

The issues I think might be relevant:
- why does Net::SSH close the socket after forwarding data? Is this a
Windows problem?
- Or is my problem that Drb is sending some kind of stop signal that
Net::SSH is interpreting as a closed session?
- Or should I avoid Net::SSH and use Putty or some other SSH client to
create the tunnel?

I can post my scripts and/or sshd_config on request, not sure if that is
going to be useful. I might also ask for help in how to ssh debug, as I'= m
sure that might be revealing but I haven't figured out how to read the
active ssh log file (!).

Catch Jamis buck on Capistrano mailing list or his blog. He rarely
pops in here i suppose.

--=20
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://blog.gnufied.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top