n order to get host based authentication with OpenSSH to work under Windows server it is necessary to run the server with privilege separation instead of as the system account.
- Either download and install OpenSSH for Windows,
- I'm assuming you installed the package in
C:\Program Files\OpenSSH - Create an empty folder in
C:\Program Files\OpenSSH\var\emptywhich will be the OpenSSH server user's home directory. - Create the server users account:
net user sshd password /add /fullname:"sshd daemon" /homedir:"C:\Program Files\OpenSSH\var\empty" - Add the server users account (sshd) to the Administrators group.
- net localgroup Administrators sshd /add
- C:\Program Files\OpenSSH\bin>mkpasswd -l -u sshd >> ..\etc\passwd
- Finally start/restart the sshd daemon
- C:\Program Files\OpenSSH\bin>net stop opensshd
- C:\Program Files\OpenSSH\bin>net start opensshd
More details: http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/