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

Vilar Camara vilarneto@hotmail.com
Tue May 30 01:03:00 GMT 2006


Hello,

Well, things get more and more confusing. That's what I did:

- Removed c:\cygwin from PATH;
- Uninstalled cygwin services (actually only sshd);
- Installed a fresh, new cygwin instance under J:\cygwin (a NTFS partition). 
Accepted default package set, only added openssh and dependences;
- Rebooted, ssh-host-config -y;
- ssh localhost.

Still no success!

Then (in despair):

- Stopped other non-cygwin related services (apache, filezilla) and 
background apps;
- Killed every non-essential process from Task Manager;
- Changed PATH to include only %SystemRoot%\system32 and %SystemRoot%;
- Stopped sshd, ssh-host-config, started sshd;
- ssh localhost.

Still, again, nothing!

Now I'm completely clueless. Since this happens in two very distinct 
machines (my desktop and my notebook), I don't think it is hardware-related.

May cygwin be incompatible with Brazilian Portuguese Windows? Or maybe my 
computers are cursed and need to be exorcized, I don't know.

Now, some answers:

>The important clue is this:
>
> > 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
>
>on your first post.  The -1 I'm interpreting as meaning "not found" or 
>"doesn't
>exist", see below why.

It makes sense, since I didn't run ssh-user-config before my first post. 
Everytime I erase ~/.ssh, these numbers go back to -1.

Still, it's strange that ssh-user-config generates files that produce 
parsing errors when read by ssh client.

>Testing on my PC produces this:
>
> > debug1: identity file /home/rberber/.ssh/identity type -1
> > debug1: identity file /home/rberber/.ssh/id_rsa type -1
> > debug1: identity file /home/rberber/.ssh/id_dsa type 2
> > debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3

I can't get the last line. Maybe the handshaking stops before an agreement.

>It could be the FAT32 file system, no file owner, no acl, I guess Cygwin 
>can't
>come up with other permissions than rwx for everybody.
>
>Since you also have priviledge separation and sshd is very picky about
>permissions, there could be a combination of factors that produce the 
>problem.

If so, it should be important to note in the docs that FAT32 is incompatible 
with privilege separation. But there is also one thing: a year ago I was 
using cygwin sshd in my desktop (it was Windows 2000 back then), and I had 
no problems at all, even using FAT32.

Maybe security restrictions got tighter.

>I don't know why should it hang instead of showing an explicit error  -- 
>perhaps
>it only appears to hang, i.e. no output.

Hmm, maybe, but it's strange that when I run /usr/sbin/sshd -D the terminal 
completely hangs, i.e., it doesn't accept Ctrl+C anymore. I have to kill the 
window.

>For testing you could try:
>
>1.  Disable privilege separation.  Perhaps it doesn't work because of 
>FAT32.

Good point. Tried, but no luck with that.

>2.  What does "ls -al ~/.ssh" show for owner/group/permissions.

On my desktop (NTFS):

drwx------+ 2 vilarnt Nenhum    0 May 29 21:02 .
drwxr-xr-x+ 3 vilarnt Nenhum    0 May 29 20:52 ..
-rw-------+ 1 vilarnt Nenhum 1650 May 29 21:02 authorized_keys
-rw-------  1 vilarnt Nenhum  736 May 29 20:52 id_dsa
-rw-r--r--  1 vilarnt Nenhum  607 May 29 20:52 id_dsa.pub
-rw-------  1 vilarnt Nenhum 1743 May 29 21:02 id_rsa
-rw-r--r--  1 vilarnt Nenhum  399 May 29 21:02 id_rsa.pub
-rw-------  1 vilarnt Nenhum  980 May 29 21:02 identity
-rw-r--r--  1 vilarnt Nenhum  644 May 29 21:02 identity.pub

"vilarnt" is me, "nenhum" means "none". It appears reasonable. On my 
notebook (FAT32), files are -rw-r--r-- and dirs (. and ..) are drwxr-xr-x. 
Strictly speaking, permissions aren't assured under FAT32, but we know that 
the file system doesn't help on that.

>The same for
>just your home directory, as I said sshd is very picky...

On my desktop (NTFS):

drwxr-xr-x+ 3 vilarnt Nenhum    0 May 29 20:52 .
drwxrwxrwx+ 3 vilarnt Nenhum    0 May 29 19:42 ..
-rw-------  1 vilarnt Nenhum  239 May 29 19:51 .bash_history
-rwxr-xr-x  1 vilarnt Nenhum 1150 May 29 19:41 .bash_profile
-rwxr-xr-x  1 vilarnt Nenhum 3116 May 29 19:41 .bashrc
-rwxr-xr-x  1 vilarnt Nenhum 1461 May 29 19:41 .inputrc
drwx------+ 2 vilarnt Nenhum    0 May 29 21:02 .ssh

Again, everything makes sense. Under FAT32 permissions seem to be always 
-rw-r--r-- and drwxr-xr-x.

I'm stuck here. I was hoping that a complete reinstallation under NTFS 
should solve the problem, but it was not the case.

Do you, or any other reader around, have any other tip?

And thanks for your priceless patience so far... :-)

--
Best regards,
Vilar Camara Neto



--
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/



More information about the Cygwin mailing list