-
Notifications
You must be signed in to change notification settings - Fork 781
sshd in interactive mode does not work when logging in as non-admin #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try changing the sshd_config as mentioned in this issue #493. |
@bagajjal |
Are you running the sshd.exe in the administrator mode? |
@bagajjal |
1314 - A required privilege is not held by the client. You need to provide your account the following privilege "Replace a process level token" Currently, due to logic around PTY support in Windows, only admins can successfully spawn off the session process. i.e you need to logon as an admin if you run sshd in interactive mode. |
I actually had to do this for "NT Service\sshd" as well... v0.0.12.0 I did run the ./install-sshd.ps1 script, but this step was also required. Unfortunately, I couldn't find a command line equivalent for use in psexec, so had to resort to the secpol GUI through terminal services. |
I cloned and built on May 19. Used the scripts to configure. Win10 configured okay. Win 7 required using the using the Local Security Policy UI to set "NT Service\sshd" in "Replace a process level token". Symptom was that sshd -d worked, but sshd did not. |
@razrjk the install script should have added this privilege automatically. Can you double check the script you used? |
To be clear. My Win10 and Win7 sshd services are both now working using domain credentials and logon passwords. I installed using the PS script. Win 7 required the manual security policy settings to get rid of the (1314) error. |
My Win10 sshd server is functioning correctly, and supports git, which I assume is binary data stream transfer. There are no errors in the log. |
@razrjk RegOpenKeyExW (error 5) is fixed in the may end release.. |
Hello. When trying to login non-administrator user having error 1260 "Cannot create process". Admins logging fine, simple users not. Tried to include it in group that is in AllowGroups, with no result. Debug logs tells that it is something with ssh-shellhost.exe (permissions for this user is read-execute).
upd: |
@alexander-n-lunev - sshd is running as "NT Service/sshd" (you can check this in task manager, check for sshd process)? Error 1260 means, ERROR_ACCESS_DISABLED_BY_POLICY 1260 (0x4EC) |
@bagajjal thank you! Indeed, AppLocker rules was in place. Added rule for ssh users group to run all from OpenSSH folder and everything started to work. Thank you again! |
With changes in underlying architecture starting from 1.0.0.0, sshd needs to run as SYSTEM and the original restrictions detailed earlier in this thread are no longer applicable. |
Please answer the following
"OpenSSH for Windows" version
maybe v0.0.11.0 or v0.0.9.0 ,sorry i forgot.
OS details
windows 7
What is failing
I use secureCRT to connect ssh server in windows 7 in vmware station(the same computer),
I have input name and password,but I can't connect it. More accurately, i connect ssh server just a moment.
log in sshd.log:
1132 18:13:31 517 error: Couldn't create pid file "./sshd.pid": Permission denied
1132 18:13:31 641 Accepted password for Administrator from 192.168.1.23 port 11491 ssh2
1132 18:13:31 654 error: Error retrieving user environment variables. RegOpenKeyExW returned 5
1132 18:13:31 655 fatal: ERROR. Cannot create process (1314).\n
Expected output
connect.
Actual output
Connection was reset.
Thank you
The text was updated successfully, but these errors were encountered: