This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ssh client disconnect error


hi all

i cant connect to my local sshd using vista home. 
after numerous attempts to install (10) i have read every posting on this issue
but still my problem persisted.
i have my mcfee fiewall turned off.

the error 
ssh_exchange_identification: Connection closed by remote host is produced. see
below.

the steps i followed

1) download a new cgywin and the sshd/ssh components
2) recovered from previous attempts of sshd installation
3) ran the ssh-host-config.
4) started sshd as service
5) confirm the sshd started as serice.
6) ran ssh-user-config
7) ssh to localhost
8) sshd.log has no new entries


--step 2--
$ net stop sshd
$ cygrunsrv -R sshd
$ net user sshd /DELETE
$ rm -R /etc/ssh*

---step 3-----
$ ssh-host-config -y
Generating /etc/ssh_host_key
Generating /etc/ssh_host_rsa_key
Generating /etc/ssh_host_dsa_key
Generating /etc/ssh_config file
Privilege separation is set to yes by default since OpenSSH 3.3.
However, this requires a non-privileged account called 'sshd'.
For more info on privilege separation read /usr/share/doc/openssh/README.privsep
.

Should privilege separation be used? (yes/no) yes
Generating /etc/sshd_config file


Warning: The following functions require administrator privileges!

Do you want to install sshd as service?
(Say "no" if it's already installed as service) (yes/no) yes

You appear to be running Windows 2003 Server or later.  On 2003 and
later systems, it's not possible to use the LocalSystem account
if sshd should allow passwordless logon (e. g. public key authentication).
If you want to enable that functionality, it's required to create a new
account 'sshd_server' with special privileges, which is then used to run
the sshd service under.

Should this script create a new local account 'sshd_server' which has
the required privileges? (yes/no) yes

Please enter a password for new user 'sshd_server'.  Please be sure that
this password matches the password rules given on your system.
Entering no password will exit the configuration.  PASSWORD=corba99

User 'sshd_server' has been created with password 'corba99'.
If you change the password, please keep in mind to change the password
for the sshd service, too.

Also keep in mind that the user sshd_server needs read permissions on all
users' .ssh/authorized_keys file to allow public key authentication for
these users!.  (Re-)running ssh-user-config for each user will set the
required permissions correctly.


Which value should the environment variable CYGWIN have when
sshd starts? It's recommended to set at least "ntsec" to be
able to change user context without password.
Default is "ntsec".  CYGWIN=ntsec tty

The service has been installed under sshd_server account.
To start the service, call `net start sshd' or `cygrunsrv -S sshd'.

Host configuration finished. Have fun!

----step 4 ----
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.


--step 5----
$ netstat -an | grep 22
  TCP    0.0.0.0:22             0.0.0.0:0              LISTENING
  UDP    [fe80::3ddb:76c6:224:61cf%9]:1900  *:*
  UDP    [fe80::3ddb:76c6:224:61cf%9]:52498  *:*

--step 6----

$ ssh-user-config -y
Generating /home/lucio/.ssh/identity
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Adding to /home/lucio/.ssh/authorized_keys
Generating /home/lucio/.ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Adding to /home/lucio/.ssh/authorized_keys
Generating /home/lucio/.ssh/id_dsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Adding to /home/lucio/.ssh/authorized_keys

Configuration finished. Have fun!

--step 7 ----
cant connect to local host

$ ssh -vvv localhost
OpenSSH_5.0p1, OpenSSL 0.9.8h 28 May 2008
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/lucio/.ssh/identity type 0
debug3: Not a RSA1 key file /home/lucio/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/lucio/.ssh/id_rsa type 1
debug3: Not a RSA1 key file /home/lucio/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/lucio/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host


any help is most appreciated.

-lucio




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]