Thursday, 8 October 2009

Installing OpenSSH for Windows Server - How to get it working

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\empty which 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

No comments:

Post a Comment