Re: openssh cygwin: connection closed by remote host




René Berber wrote:
kherring wrote:

I have installed OpenSSH V4.2 on a windows 98 box running cygwin so
that I can log in to it remotely. I am able to do so, but I have
noticed that after I log in/out say 5 or so complete round trips ( by
round trip I mean logging in then logging out), I get the following
message when trying to log in remotely:

ssh_exchange_identification: Connection closed by remote host

From then on I am not able to connect remotely until I kill sshd.exe
and then restart it by doing so physically at the windows box. Any
ideas on why this might be happening. My apologies if this isn't the
correct newsgroup for this post. Thanks,

Never seen that problem, do you have any log error messages in Windows
event viewer - application? If you are using syslog then the messages
are in /var/log/messages.

If there are no errors then a possible cause is the configuration of
MaxStartups in your /etc/sshd_config, if you have it then look at the
man page to see what it means or just try running the daemon w/o it to
see if that solves the problem.
--
René Berber

Thanks for the advice. I ran ssh with the -v option and noted the
following:

1) during the first several connections i got the following messages:

OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to blah.edu [myIP] port 22.
debug1: Connection established.
debug1: identity file /usr/users/myName/.ssh/identity type -1
debug1: identity file /usr/users/myName/.ssh/id_rsa type -1
debug1: identity file /usr/users/myName/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version
OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'blah.edu' is known and matches the RSA host key.
debug1: Found key in /usr/users/myName/.ssh/known_hosts:60
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /usr/users/myName/.ssh/identity
debug1: Trying private key: /usr/users/myName/.ssh/id_rsa
debug1: Offering public key: /usr/users/kherring/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.


2) When the failure starts to occur, this is the message:

OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to rsegph1.mit.edu [18.62.8.156] port 22.
debug1: Connection established.
debug1: identity file /usr/users/kherring/.ssh/identity type -1
debug1: identity file /usr/users/kherring/.ssh/id_rsa type -1
debug1: identity file /usr/users/kherring/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host

does this make the problem any more obvious? I'm still stumped.
Thanks again for any help.

.



Relevant Pages

  • Re: SSH problem (was ssh cipher)
    ... > debug: Connection established. ... > Unallowed source IP (I can telnet in, but not SSH) ... debug1: Reading configuration data /etc/ssh_config ... Connection closed by remote host ...
    (FreeBSD-Security)
  • Re: login differences between LAN and WAN to openSSH on cygwin with putty
    ... $ ssh -v 192.168.0.127 ... debug1: Connection established. ... Remote protocol version 1.99, ...
    (SSH)
  • Are remote pipes fixed in 3.5?
    ... > and ssh will never return. ... SSH2 will shut down the channel without telling the ... > remote side that stdout has closed. ... > debug1: channel request 0: exec ...
    (SSH)
  • ssh and rsa authentication
    ... I am trying to use rsa authentication to log into a remote host. ... debug1: Reading configuration data /etc/ssh/ssh_config ...
    (comp.security.ssh)
  • ssh to NATed box fails
    ... From the local end, I can ping the remote end OK, but I cannot ssh to it: ... debug1: Rhosts Authentication disabled, originating port will not be trusted. ... debug1: Connection established. ...
    (Debian-User)