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]

sshd+ssh localhost connects, but don't reach the shell

Hello everyone,

As a programmer, I'll try to be somewhat verbose. Sorry if there is information in excess.

I've installed sshd following the tutorial on, including the mkpasswd and mkgroup steps. The service runs without complains and sshd.exe shows on Task Manager. I did no changes in /etc config files, so the only uncommented lines are:

   StrictModes no
   UsePrivilegeSeparation yes
   Subsystem       sftp    /usr/sbin/sftp-server

/etc/ssh_config: all lines are commented.

However, when I run 'ssh localhost' no feedback is given at all (until I do Ctrl+C). 'ssh -vvv localhost' gives the following:

OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [] port 22.
debug1: Connection established.
debug1: identity file /home/vilarnt/.ssh/identity type -1
debug1: identity file /home/vilarnt/.ssh/id_rsa type -1
debug1: identity file /home/vilarnt/.ssh/id_dsa type -1

...and stops there (i.e., there is no shell or password prompt). Also, each time I run ssh a new "sshd.exe" process appears on Task Manager, so it appears that socket connection is made and a server process is forked as expected.

Trying to find a solution, I ran sshd as a non-daemon process. Steps taken:

cygrunsrv -E sshd
Killed all "sshd.exe" instances in the Task Manager
/usr/sbin -Dd sshd

...which gives:

debug1: sshd version OpenSSH_4.3p2
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-Dd'
debug1: Bind to port 22 on
Server listening on port 22.
Generating 768 bit RSA key.
RSA key generation complete.

In another terminal I ran 'ssh -vvv localhost'. This gives me exactly the output transcribed when sshd was running as a service. Back to the first terminal, sshd gave me also:

debug1: fd 4 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7

Again, the terminal with ssh client is stuck. The only difference is that, according to Task Manager, no additional "sshd.exe" process were created (as expected, since the server output says so). This made me try a new round with no debug info (i.e., "/usr/sbin/sshd -D"), but unfortunately I had no luck yet.

Finally, I tried another ssh client (SSH Secure Shell 3.2.9 from SSH Communications Security Corp.). From the server point of view, there was no difference at all. The client stays locked (sigh) with a message that says "Connecting to localhost...".

The fact that both clients (the cygwin one and a Windows one) behave equivalently makes me think that the issue is somewhere in the server side (config files, maybe?).

Relevant additional system info: Running Windows XP Pro SP2 (Brazilian Portuguese edition); cygwin is installed on a FAT32 partition (so file permissions aren't a problem?); firewall is turned off during the tests. Also, I've tried the same tests on another computer, which has the same OS and a FAT32 partition. No luck at all.

I'm eager to know if someone has any tip...

Best regards,
Vilar Camara Neto

Attachment: cygcheck.out
Description: Binary data

Unsubscribe info:
Problem reports:

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