-
Notifications
You must be signed in to change notification settings - Fork 781
Configure OpenSSH using Service Account. #1824
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
error 1297 when starting service using service account |
Your description is extremely brief. Could you please provide a sequence of instructions (e.g. command lines) that will allow us to exactly reproduce this error? |
Can I resurrect this issue? I'm also interested in running OpenSSH on Windows under a service account (instead of SYSTEM). The steps to reproduce the issue are:
Windows could not start the OpenSSH SSH Server service on Local Computer. Error 1297: A Privilege that the service requires to function properly does not exist in the service account configuration. |
Perhaps have e.g. a look at the |
I'm not really a developer, so I might be wrong, but it looks like it needs to be able to create a process-level token. There is a "User Right" in Windows for that, but it's considered to be a pretty big one, i.e. I'm not sure how big of a security win it would be to have it not be running as SYSTEM but give it the process token rights. That's the part where I don't know enough about coding to know how important that right is to the overall picture, or how hard it would be to re-work it so it doesn't need that. I'll explore doing it with user rights and report back in a few days... |
Update: Adding the token-related user rights doesn't seem to allow it to run as a service account. Same error message as above is still produced. So, since it seems like it's doing some intentional checking before proceeding, this may be more in the realm of a "feature request," i.e. to add the ability to run as a non-admin service account. |
I had the same issues and ended up comparing a few servers to get this working. I added my service account (DOMAIN\user-name) as an administrator and then made sure administrator existed on some policies (I don't know which are not required as admin already existed in many): (run Administrator exists in the following policies. The bold item was the last I updated before it started working.
|
I only had to add my user account (which has admin rights) to these 2 policies:
|
I was able to run it under a virtual service account, "NT Service\sshd." This account was used in previous versions. I couldn't find information about why it was switched to run in the SYSTEM context, which is far less secure due to reduced service isolation. The topic was partly discussed in #681 regarding running the service in the network service context. I'm currently using version v8.1.0.0p1-Beta (an update is already scheduled). However, my findings might help in running the service under a domain service account context. Security Policies Needed:
File Permissions:
Registry Permission:
|
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
Latest
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Win10 Pro
What is failing
Unable to run openssh service using Domain Service account.
Also, I want to use Chroot for that same service account.
Actual output
The text was updated successfully, but these errors were encountered: