已答覆 Cygwin sshd?

  • 4 สิงหาคม 2552 19:36
     
     
    Has anyone else had trouble getting Cygwin sshd to work?

    I've followed the instructions here:
    http://www.petri.co.il/setup-ssh-server-vista.htm

    The service does start.  However, whenever I attempt to connect, the following error shows up in the event log:
         sshd: PID 5096: fatal: setreuid 500: No such process

    I've tried a number of variations on the configuration.  I've tried it with and without privilege separation, I've checked the service-definition with "cygrunsrv -VQ sshd", and checked the user's rights with "editrights -l -u sshd_server", and it all looks happy as near as I can determine.  But it keeps coming back to this setruid() problem.

    Any suggestions?

    Thanks,
    -Luke
    • แก้ไขโดย Luke Scharf 4 สิงหาคม 2552 20:21
    •  

ตอบทั้งหมด

  • 4 สิงหาคม 2552 20:31
     
     คำตอบ
    I think I've found a work-through.

    The machine on which I'm installing sshd is a domain controller.  There was an old account called sshd_server, which appeared to have the right privileges that had been created during an earlier installation of cygwin on Windows 2003.  When I deleted sshd and sshd_server (and their associated entries from /etc/passwd and /etc/group) and let ssh-host-config re-create the account, that made everything work.

    Of course, now I have to fix the sshd daemons on the other DCs in the cluster, so we'll see how that goes...
    • ทำเครื่องหมายเป็นคำตอบโดย Luke Scharf 4 สิงหาคม 2552 21:12
    •  
  • 4 สิงหาคม 2552 21:12
     
     คำตอบ มีโค้ด
    Note1:
    I had to manually re-enter the credentials in the Administrative Tools | Services | "Cygwin sshd" | Properties dialog on the next server.

    Note2:
    I also had to assign the following privelages to the cyg_server account on the next ssh-server in the cluster:
    editrights -a SeTcbPrivilege -u cyg_server
    editrights -a SeAssignPrimaryTokenPrivilege -u cyg_server
    editrights -a SeCreateTokenPrivilege -u cyg_server
    editrights -a SeIncreaseQuotaPrivilege -u cyg_server
    editrights -a SeServiceLogonRight -u cyg_server
    editrights -a SeDenyRemoteInteractiveLogonRight -u cyg_server

    • ทำเครื่องหมายเป็นคำตอบโดย Luke Scharf 4 สิงหาคม 2552 22:05
    •  
  • 25 เมษายน 2556 13:46
     
      มีโค้ด
    Note1:
    I had to manually re-enter the credentials in the Administrative Tools | Services | "Cygwin sshd" | Properties dialog on the next server.

    Note2:
    I also had to assign the following privelages to the cyg_server account on the next ssh-server in the cluster:
    editrights -a SeTcbPrivilege -u cyg_server
    editrights -a SeAssignPrimaryTokenPrivilege -u cyg_server
    editrights -a SeCreateTokenPrivilege -u cyg_server
    editrights -a SeIncreaseQuotaPrivilege -u cyg_server
    editrights -a SeServiceLogonRight -u cyg_server
    editrights -a SeDenyRemoteInteractiveLogonRight -u cyg_server


    I was receiving this error message "/bin/switch: Operation not permitted".  Assigning the rights as you suggested worked for me on Server 2008 R2.  Thank you!