SSH server on Windows Vista or Windows 7


+

Search Tips   |   Advanced Search

 

  1. Right-click Cygwin icon and select Run as administrator

  2. Execute...

      ssh-host-config

    Say yes to all yes/no questions except for when it asks to use different user for registered services other than 'cyg_server'.

    Enter a user that has Administrative privileges and a password.

  3. Edit /etc/hosts.allow and insert...

      ALL: 127.0.0.1/32 : allow
      ALL: [::1]/128: allow

  4. Go to Control Panel ... Windows Firewall and open inbound TCP port 22. Optional?

  5. Start ssh server

      cygrunsrv -R sshd

    ...or...

      net start sshd

  6. Log on as a regular user and run...

      ssh-user-config (Answer questions as appropriate to situation)


Note

You can run sshd as an existing user (Cygwin 1.7.1 and Windows 7)

Administrator is disabled on Windows 7 by default.

To enable run lusrmgr.msc.

For a regular user, such as Michael, to run sshd.

  1. Check existing permissions for Michael (in case you need to rollback):

      editrights -l -u Michael

  2. Add additional privileges to allow sshd to run properly:

      editrights.exe -a SeAssignPrimaryTokenPrivilege -u Michael
      editrights.exe -a SeCreateTokenPrivilege -u Michael
      editrights.exe -a SeTcbPrivilege -u Michael
      editrights.exe -a SeServiceLogonRight -u Michael

  3. Run ssh-host-config (don't force the -y option)

      ssh-host-config

  4. Answer yes to all questions making sure when it asks "Do to use a different name?", say "yes" (this question is different with the -y option)

  5. Enter desired username (Michael) and password when you are prompted. You should *not* see any warnings. If you do, you might not have set all privileges correctly

  6. If all goes well, start sshd:

      net start sshd


Uninstall cygwin under Vista or Windows 7

(From previous attempted failed installations)

In Administrator shell

Delete any user listed like sshd or sshd_server.

The following syntax is to be used:

In User shell...


Related

    Install sshd on Windows Vista