3

I'm trying to use SSH authentication between my WinXP desktop running Cygwin and a Mac laptop, and for the life of me, I can't get it working. My public key is on the macbook in the authorized_keys directory, and my private key is sitting there, all nice and happy in my ~/.ssh folder.

Here are the relevant lines from running ssh -vv user@server

debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /c/cygwin/home/beerhalj/.ssh/identity
debug1: Trying private key: /c/cygwin/home/beerhalj/.ssh/id_rsa
debug1: Trying private key: /c/cygwin/home/beerhalj/.ssh/id_dsa
debug1: read PEM private key done: type DSA
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method

It looks like my server sends a publickey packet, then doesn't send a packet and disables. Why? Or, what possible things should I try? Any help or suggestions would be appreciated.

As per SparX suggestion, I cat'd my sshd_config and there are only three non-comment lines

Protocol 2
SyslogFacility AUTHPRIV
Subsystem sftp/usr/libexec/sftp-server
WindyCityEagle
  • 213
  • 3
  • 6

2 Answers2

3

Make sure that the authorized_keys file as well as the .ssh folder and your home folder aren't writable by anyone but yourself. Sshd disregards it otherwise.

ak2
  • 562
  • 3
  • 4
1

I'd like to add a follow-up answer, just to keep in mind in the future. As of a few years ago, and this is probably still true, there still doesn't exist a perfect mapping of NT/AD style permissions to Unix permissions. I remember having a problem that if my .ssh files resided on a network drive, and were being used under cygwin, the permissions couldn't be set properly on the files, because the permissions model didn't allow for it.

It's possible to get burned by this and have it stump you for hours. However, I am guessing your current case that your files reside on a local drive, and this isn't affecting you.

Larold
  • 812
  • 4
  • 13
  • 21