Re: openssh cygwin: connection closed by remote host




Andrew Schulman wrote:
Running ssh -vv or -vvv on the client will give you more information, which
may help to illuminate what happened.

What do the server logs show from this exchange? Did you crank up LogLevel
to VERBOSE or DEBUG in /etc/ssh/sshd_config and restart sshd?

So I have noticed that upon logout from a remote session that the
forked sshd process is not killed. So say after having logged in and
then out 5 complete round trips there will be 6 sshd processes running
on the remote windows box, 1 corresponding to the original and 5 forked
processes from the 5 now closed connections. Could it be that this is
the source of my problems?

I don't see anything in sshd_config that relates to the number of allowed
concurrent connections from one user, but it is strange that those old
processes stay around, and that might be related to your problem.

Also when running sshd in debug mode I was
unable to open a connection, got: will not fork when running in
debugging mode. Should I need to fork on the first and only
connection?

Any time someone logs into the server, it forks off a new process to handle
the new connection. But you misunderstood me: I didn't say to run sshd in
debug mode (sshd -d). I said to set LogLevel to VERBOSE or DEBUG in
/etc/ssh/sshd_config, and restart sshd.

Any thoughts? If this is the problem, is there a way to force the sshd
process for the current connection closed without disturbing the
orignal sshd process? Thanks for any help.

Yes, you can kill the child sshd processes without harming the parent sshd.
Try doing that by hand before you reach 5 leftover processes, and see if
that allows you to keep logging in.

--
To reply by email, change "deadspam.com" to "alumni.utexas.net"

So I did try killing the new sshd processes by hand and it worked. I
can now log in as many times as I want without issue. Also I noticed
that when I start a new connection an sshd process is created with
parent pid = pid of the original sshd process, and also another process
with ppid=1. So two new sshd processes are created per new connection.
And upon logout the process with ppid=1 remains, but the other with
parent equal to the original sshd process goes away. Is this a hint?
If this problem can't be solved directly I'd be interested in hearing a
way in which to kill the child sshd processes upon logout in a clean
manner. The way in which I did it just now causes the remote terminal
to freeze since it is logged in and its sshd process is killed before
logging out. I have shell scripts logging in, doing stuff, and then
logging out, numerous times so i can't really have the term freeze each
time. Any thoughts on a solution or if not a solution for this work
around? Thanks again.

.



Relevant Pages

  • Re: openssh cygwin: connection closed by remote host
    ... What do the server logs show from this exchange? ... Did you crank up LogLevel ... forked sshd process is not killed. ... unable to open a connection, got: will not fork when running in ...
    (comp.security.ssh)
  • Re: openssh cygwin: connection closed by remote host
    ... debug1: Connection established. ... So I have noticed that upon logout from a remote session that the ... forked sshd process is not killed. ...
    (comp.security.ssh)
  • Re: openssh cygwin: connection closed by remote host
    ... parent pid = pid of the original sshd process, ... So two new sshd processes are created per new connection. ... I have shell scripts logging in, doing stuff, and then ... and you should report it as such to the Cygwin ...
    (comp.security.ssh)
  • Re: SSH connection problems
    ... NWR> check its contents. ... NWR> sshd process. ... the error message indicates the server terminated ... the connection immediately after opening it, ...
    (comp.security.ssh)
  • Re: Vista RAS/DUN Error 31 Trace - Who will look at it?
    ... It includes all available logs with links for easy viewing. ... used netsh ras diagnostics to enable logging for all events, ... I attempted to connect with straight DUN using the ... NationalAccess-BroadbandAccess connection from Network Connection ...
    (microsoft.public.windows.vista.networking_sharing)