Why does ssh-host-config create two users in Cygwin on Windows 8.1?Cygwin sshd on Windows 7 issueHow to SSH to Windows 7 as a privileged userHow to get rid of QueryServiceStatus: Win32 error 1062 when you try to start sshd on Cygwin?cygwin sshd fails to allocate pty for some usersSeTcbPrivilege not working, RSoP.msc, gpresult show it's enabled, whoami /priv shows disabledCygwin OpenSSH Server Error 1062How do I run dnscmd via ssh?Create domain policy to assign user rightscygwin sshd “getnameinfo failed”Cygwin ssh with keys error - A specified logon session does not exist
How to have a sharp product image?
An array in a equation with curly braces in both sides
Israeli soda type drink
A Note on N!
Trouble removing package using Yum on CentOS7
My bank got bought out, am I now going to have to start filing tax returns in a different state?
Is there really no use for MD5 anymore?
Contradiction proof for inequality of P and NP?
What was Apollo 13's "Little Jolt" after MECO?
Is there metaphorical meaning of "aus der Haft entlassen"?
Can someone publish a story that happened to you?
Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?
Cayley's Matrix Notation
Where was the County of Thurn und Taxis located?
What is purpose of DB Browser(dbbrowser.aspx) under admin tool?
A faster way to compute the largest prime factor
How do I reattach a shelf to the wall when it ripped out of the wall?
How long after the last departure shall the airport stay open for an emergency return?
Work requires me to come in early to start computer but wont let me clock in to get paid for it
How bug prioritization works in agile projects vs non agile
Island of Knights, Knaves and Spies
All ASCII characters with a given bit count
How much of a wave function must reside inside event horizon for it to be consumed by the black hole?
Don’t seats that recline flat defeat the purpose of having seatbelts?
Why does ssh-host-config create two users in Cygwin on Windows 8.1?
Cygwin sshd on Windows 7 issueHow to SSH to Windows 7 as a privileged userHow to get rid of QueryServiceStatus: Win32 error 1062 when you try to start sshd on Cygwin?cygwin sshd fails to allocate pty for some usersSeTcbPrivilege not working, RSoP.msc, gpresult show it's enabled, whoami /priv shows disabledCygwin OpenSSH Server Error 1062How do I run dnscmd via ssh?Create domain policy to assign user rightscygwin sshd “getnameinfo failed”Cygwin ssh with keys error - A specified logon session does not exist
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
In trying to resolve some issues with using Cygwin + SSH on Windows 8.1, I'd like to know why the ssh-host-config
script creates two new accounts configuring OpenSSH from scratch? (Is this necessary?)
The two accounts are: cyg_server
and sshd
, when using default selection + privilege escalation and service installation. I understand the first one is used only for starting the Cygwin SSHd service, but I don't understanding the function of the second one. I searched the Cygwin archives and the only developer explanation was "because it was designed to do so." It's also recommended against using these for actual login.
Here's my installation:
-----------------------------------------------------------
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'XXXXXXXXXX'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: Also keep in mind that the user 'cyg_server' needs read permissions
*** Info: on all users' relevant files for the services running as 'cyg_server'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
-----------------------------------------------------------
In addition, 'cyg_server' is a visible account, that can be used to for Windows login, but 'sshd' seem hidden. So I'm left with the conclusion I'll have to add yet another 3rd account to be able to use SSH properly, which seem rather crazy!
EDIT-1: Not only that, the sshd account also has a password expiration date set 40 days from installation and has a password (according to WMIC). (I was never asked to entered a password for this account, during ssh setup.)
Doing: wmic useraccount get AccountType,...,Status
:
AccountType Disabled Lockout Name PasswordChangeable PasswordExpires PasswordRequired Status
512 FALSE FALSE cyg_server TRUE FALSE TRUE OK
512 TRUE FALSE sshd TRUE TRUE TRUE Degraded
and net user sshd
:
User name sshd
Full Name sshd privsep
Comment
User's comment
Country/region code 000 (System Default)
Account active No
Account expires Never
Password last set 2014-03-01 23:20:19
Password expires 2014-04-12 23:20:19
Password changeable 2014-03-01 23:20:19
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory C:cygwin64varempty
Last logon Never
Logon hours allowed All
Local Group Memberships *Users
Global Group memberships *None
The command completed successfully.
So this opens two more questions about this:
- What is the password set and why was the user not informed about
this? - Why does this password have an expiration date?
EDIT-2: Not being able to get through to the Cygwin developer list, I had to do further investigation on my own. So far I don't have an answer to question 1, but there are several other issues with the ssh-host-config script used for setup. Bottom line is, that you can always remove both sshd & cyg_server accounts, and setup one proper admin account using their settings as reference.
Question 2: Windows 8.1 has a default password expiration set to 42 days. This has to be either changed or disabled, using normal Windows tools (UI, WMIC, net user, etc)
ssh cygwin windows-8.1 cygwin-sshd
add a comment |
In trying to resolve some issues with using Cygwin + SSH on Windows 8.1, I'd like to know why the ssh-host-config
script creates two new accounts configuring OpenSSH from scratch? (Is this necessary?)
The two accounts are: cyg_server
and sshd
, when using default selection + privilege escalation and service installation. I understand the first one is used only for starting the Cygwin SSHd service, but I don't understanding the function of the second one. I searched the Cygwin archives and the only developer explanation was "because it was designed to do so." It's also recommended against using these for actual login.
Here's my installation:
-----------------------------------------------------------
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'XXXXXXXXXX'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: Also keep in mind that the user 'cyg_server' needs read permissions
*** Info: on all users' relevant files for the services running as 'cyg_server'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
-----------------------------------------------------------
In addition, 'cyg_server' is a visible account, that can be used to for Windows login, but 'sshd' seem hidden. So I'm left with the conclusion I'll have to add yet another 3rd account to be able to use SSH properly, which seem rather crazy!
EDIT-1: Not only that, the sshd account also has a password expiration date set 40 days from installation and has a password (according to WMIC). (I was never asked to entered a password for this account, during ssh setup.)
Doing: wmic useraccount get AccountType,...,Status
:
AccountType Disabled Lockout Name PasswordChangeable PasswordExpires PasswordRequired Status
512 FALSE FALSE cyg_server TRUE FALSE TRUE OK
512 TRUE FALSE sshd TRUE TRUE TRUE Degraded
and net user sshd
:
User name sshd
Full Name sshd privsep
Comment
User's comment
Country/region code 000 (System Default)
Account active No
Account expires Never
Password last set 2014-03-01 23:20:19
Password expires 2014-04-12 23:20:19
Password changeable 2014-03-01 23:20:19
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory C:cygwin64varempty
Last logon Never
Logon hours allowed All
Local Group Memberships *Users
Global Group memberships *None
The command completed successfully.
So this opens two more questions about this:
- What is the password set and why was the user not informed about
this? - Why does this password have an expiration date?
EDIT-2: Not being able to get through to the Cygwin developer list, I had to do further investigation on my own. So far I don't have an answer to question 1, but there are several other issues with the ssh-host-config script used for setup. Bottom line is, that you can always remove both sshd & cyg_server accounts, and setup one proper admin account using their settings as reference.
Question 2: Windows 8.1 has a default password expiration set to 42 days. This has to be either changed or disabled, using normal Windows tools (UI, WMIC, net user, etc)
ssh cygwin windows-8.1 cygwin-sshd
add a comment |
In trying to resolve some issues with using Cygwin + SSH on Windows 8.1, I'd like to know why the ssh-host-config
script creates two new accounts configuring OpenSSH from scratch? (Is this necessary?)
The two accounts are: cyg_server
and sshd
, when using default selection + privilege escalation and service installation. I understand the first one is used only for starting the Cygwin SSHd service, but I don't understanding the function of the second one. I searched the Cygwin archives and the only developer explanation was "because it was designed to do so." It's also recommended against using these for actual login.
Here's my installation:
-----------------------------------------------------------
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'XXXXXXXXXX'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: Also keep in mind that the user 'cyg_server' needs read permissions
*** Info: on all users' relevant files for the services running as 'cyg_server'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
-----------------------------------------------------------
In addition, 'cyg_server' is a visible account, that can be used to for Windows login, but 'sshd' seem hidden. So I'm left with the conclusion I'll have to add yet another 3rd account to be able to use SSH properly, which seem rather crazy!
EDIT-1: Not only that, the sshd account also has a password expiration date set 40 days from installation and has a password (according to WMIC). (I was never asked to entered a password for this account, during ssh setup.)
Doing: wmic useraccount get AccountType,...,Status
:
AccountType Disabled Lockout Name PasswordChangeable PasswordExpires PasswordRequired Status
512 FALSE FALSE cyg_server TRUE FALSE TRUE OK
512 TRUE FALSE sshd TRUE TRUE TRUE Degraded
and net user sshd
:
User name sshd
Full Name sshd privsep
Comment
User's comment
Country/region code 000 (System Default)
Account active No
Account expires Never
Password last set 2014-03-01 23:20:19
Password expires 2014-04-12 23:20:19
Password changeable 2014-03-01 23:20:19
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory C:cygwin64varempty
Last logon Never
Logon hours allowed All
Local Group Memberships *Users
Global Group memberships *None
The command completed successfully.
So this opens two more questions about this:
- What is the password set and why was the user not informed about
this? - Why does this password have an expiration date?
EDIT-2: Not being able to get through to the Cygwin developer list, I had to do further investigation on my own. So far I don't have an answer to question 1, but there are several other issues with the ssh-host-config script used for setup. Bottom line is, that you can always remove both sshd & cyg_server accounts, and setup one proper admin account using their settings as reference.
Question 2: Windows 8.1 has a default password expiration set to 42 days. This has to be either changed or disabled, using normal Windows tools (UI, WMIC, net user, etc)
ssh cygwin windows-8.1 cygwin-sshd
In trying to resolve some issues with using Cygwin + SSH on Windows 8.1, I'd like to know why the ssh-host-config
script creates two new accounts configuring OpenSSH from scratch? (Is this necessary?)
The two accounts are: cyg_server
and sshd
, when using default selection + privilege escalation and service installation. I understand the first one is used only for starting the Cygwin SSHd service, but I don't understanding the function of the second one. I searched the Cygwin archives and the only developer explanation was "because it was designed to do so." It's also recommended against using these for actual login.
Here's my installation:
-----------------------------------------------------------
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'cyg_server'? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'XXXXXXXXXX'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: Also keep in mind that the user 'cyg_server' needs read permissions
*** Info: on all users' relevant files for the services running as 'cyg_server'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
-----------------------------------------------------------
In addition, 'cyg_server' is a visible account, that can be used to for Windows login, but 'sshd' seem hidden. So I'm left with the conclusion I'll have to add yet another 3rd account to be able to use SSH properly, which seem rather crazy!
EDIT-1: Not only that, the sshd account also has a password expiration date set 40 days from installation and has a password (according to WMIC). (I was never asked to entered a password for this account, during ssh setup.)
Doing: wmic useraccount get AccountType,...,Status
:
AccountType Disabled Lockout Name PasswordChangeable PasswordExpires PasswordRequired Status
512 FALSE FALSE cyg_server TRUE FALSE TRUE OK
512 TRUE FALSE sshd TRUE TRUE TRUE Degraded
and net user sshd
:
User name sshd
Full Name sshd privsep
Comment
User's comment
Country/region code 000 (System Default)
Account active No
Account expires Never
Password last set 2014-03-01 23:20:19
Password expires 2014-04-12 23:20:19
Password changeable 2014-03-01 23:20:19
Password required Yes
User may change password Yes
Workstations allowed All
Logon script
User profile
Home directory C:cygwin64varempty
Last logon Never
Logon hours allowed All
Local Group Memberships *Users
Global Group memberships *None
The command completed successfully.
So this opens two more questions about this:
- What is the password set and why was the user not informed about
this? - Why does this password have an expiration date?
EDIT-2: Not being able to get through to the Cygwin developer list, I had to do further investigation on my own. So far I don't have an answer to question 1, but there are several other issues with the ssh-host-config script used for setup. Bottom line is, that you can always remove both sshd & cyg_server accounts, and setup one proper admin account using their settings as reference.
Question 2: Windows 8.1 has a default password expiration set to 42 days. This has to be either changed or disabled, using normal Windows tools (UI, WMIC, net user, etc)
ssh cygwin windows-8.1 cygwin-sshd
ssh cygwin windows-8.1 cygwin-sshd
edited Mar 8 '14 at 0:34
not2qubit
asked Mar 4 '14 at 1:08
not2qubitnot2qubit
188129
188129
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Update 2019: This answer and question is obsolete. See Bill_Stewart's answer.
From man 5 sshd_config
UsePrivilegeSeparation
Specifies whether sshd separates privileges by creating an
unprivileged child process to deal with incoming network traffic.
After successful authentication, another process will be created
that has the privilege of the authenticated user. The goal of
privilege separation is to prevent privilege escalation by con-
taining any corruption within the unprivileged processes. The
default is "yes".
So sshd requires two types of accounts:
- One with the ability to
setuid
. - One unprivileged account.
The setup script explains that the usual SYSTEM account doesn't have setuid
privilege, thus the need for the additional privileged account.
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Thesshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).
– Bill_Stewart
Jan 17 at 15:09
add a comment |
As for why ssh-host-config
creates two user accounts is mostly answered by Dan. More on why a separate account is needed to setuid
can be found here, it's a complicated process.
As for your first sub-question, I believe it's defaults, too, like the password expiry - in /usr/share/csih/cygwin-service-installation-helper
, used by ssh-host-config, the user is created (using the Windows net command) like this, where $unpriv_user
is the name, like sshd, you selected, and $dos_var_empty
is the Windows/DOS style path to /var/empty
:
net user "$unpriv_user" /add /fullname:"$unpriv_user privsep"
"/homedir:$dos_var_empty" /active:no
The documentation by Microsoft says that the default value for /passwordreq
, if a password is required, is yes, and it seems that Windows then assigns some default password (probably because a password isn't specified, maybe in particular because /active:no
).
And for your second sub-question, like you said in your second edit, the default, at least for Windows 8.1 Pro, seems to be a password expiry after 42 days, although it's certainly not enabled on my account OR the new cyg_server
account. This is probably because of the same combination - cyg_server
specifies a password and is active, but sshd doesn't specify a password and isn't active (perhaps this is to force a password being assigned if/when the account is activated). If you want to know the exact details, I'd probably try creating more similar accounts with the expiry off/specifying the password and seeing what happens.
add a comment |
The separate disabled sshd
account is actually not used in Cygwin (at least, not any more). I asked about this on the Cygwin mailing list:
Is the sshd disabled user account still required?
Corinna Vinschen (Cygwin maintainer) responded with the following:
No, actually it isn't. These days the sshd server checks if the the privsep chrrot [sic] environment should be used and that the process is started under "root:root". This never matches under Cygwin so we could drop the sshd user requirement.
(See https://cygwin.com/ml/cygwin/2019-01/msg00120.html)
Therefore the marked answer to this question is not correct for Cygwin.
(Probably someone will update the ssh-host-config
script at some point to drop the creation of the sshd
account.)
Update 4/18/2019
The above is correct in that the sshd
account is not strictly required. The only time you will still need it is if you want to use the ChrootDirectory
setting in sshd_config
to restrict an account to SFTP only.
FWIW, I created a package that provides an easy-to-use installer that configures the Cygwin version of OpenSSH (and a couple of other tools, including rsync
). It's on GitHub if anyone is interested:
https://github.com/Bill-Stewart/Cygwin-OpenSSH
The documentation in the package describes the circumstances in which the sshd
account is used.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f579630%2fwhy-does-ssh-host-config-create-two-users-in-cygwin-on-windows-8-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Update 2019: This answer and question is obsolete. See Bill_Stewart's answer.
From man 5 sshd_config
UsePrivilegeSeparation
Specifies whether sshd separates privileges by creating an
unprivileged child process to deal with incoming network traffic.
After successful authentication, another process will be created
that has the privilege of the authenticated user. The goal of
privilege separation is to prevent privilege escalation by con-
taining any corruption within the unprivileged processes. The
default is "yes".
So sshd requires two types of accounts:
- One with the ability to
setuid
. - One unprivileged account.
The setup script explains that the usual SYSTEM account doesn't have setuid
privilege, thus the need for the additional privileged account.
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Thesshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).
– Bill_Stewart
Jan 17 at 15:09
add a comment |
Update 2019: This answer and question is obsolete. See Bill_Stewart's answer.
From man 5 sshd_config
UsePrivilegeSeparation
Specifies whether sshd separates privileges by creating an
unprivileged child process to deal with incoming network traffic.
After successful authentication, another process will be created
that has the privilege of the authenticated user. The goal of
privilege separation is to prevent privilege escalation by con-
taining any corruption within the unprivileged processes. The
default is "yes".
So sshd requires two types of accounts:
- One with the ability to
setuid
. - One unprivileged account.
The setup script explains that the usual SYSTEM account doesn't have setuid
privilege, thus the need for the additional privileged account.
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Thesshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).
– Bill_Stewart
Jan 17 at 15:09
add a comment |
Update 2019: This answer and question is obsolete. See Bill_Stewart's answer.
From man 5 sshd_config
UsePrivilegeSeparation
Specifies whether sshd separates privileges by creating an
unprivileged child process to deal with incoming network traffic.
After successful authentication, another process will be created
that has the privilege of the authenticated user. The goal of
privilege separation is to prevent privilege escalation by con-
taining any corruption within the unprivileged processes. The
default is "yes".
So sshd requires two types of accounts:
- One with the ability to
setuid
. - One unprivileged account.
The setup script explains that the usual SYSTEM account doesn't have setuid
privilege, thus the need for the additional privileged account.
Update 2019: This answer and question is obsolete. See Bill_Stewart's answer.
From man 5 sshd_config
UsePrivilegeSeparation
Specifies whether sshd separates privileges by creating an
unprivileged child process to deal with incoming network traffic.
After successful authentication, another process will be created
that has the privilege of the authenticated user. The goal of
privilege separation is to prevent privilege escalation by con-
taining any corruption within the unprivileged processes. The
default is "yes".
So sshd requires two types of accounts:
- One with the ability to
setuid
. - One unprivileged account.
The setup script explains that the usual SYSTEM account doesn't have setuid
privilege, thus the need for the additional privileged account.
edited Jan 18 at 15:27
answered Mar 25 '14 at 22:20
Dan GarthwaiteDan Garthwaite
2,5361427
2,5361427
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Thesshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).
– Bill_Stewart
Jan 17 at 15:09
add a comment |
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Thesshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).
– Bill_Stewart
Jan 17 at 15:09
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
I accept this as an answer although it is a little bit to trivial and I would have liked to see someone answer my other 2 questions.
– not2qubit
May 29 '14 at 10:35
1
1
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Thanks. I simply didn't know the answer to those sub-questions but wanted to share what I knew.
– Dan Garthwaite
May 30 '14 at 1:03
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
Does ssh break on windows 8.1 after 42 days?
– Dan Garthwaite
May 30 '14 at 1:28
The
sshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).– Bill_Stewart
Jan 17 at 15:09
The
sshd
account is no longer used in Cygwin (see cygwin.com/ml/cygwin/2019-01/msg00120.html).– Bill_Stewart
Jan 17 at 15:09
add a comment |
As for why ssh-host-config
creates two user accounts is mostly answered by Dan. More on why a separate account is needed to setuid
can be found here, it's a complicated process.
As for your first sub-question, I believe it's defaults, too, like the password expiry - in /usr/share/csih/cygwin-service-installation-helper
, used by ssh-host-config, the user is created (using the Windows net command) like this, where $unpriv_user
is the name, like sshd, you selected, and $dos_var_empty
is the Windows/DOS style path to /var/empty
:
net user "$unpriv_user" /add /fullname:"$unpriv_user privsep"
"/homedir:$dos_var_empty" /active:no
The documentation by Microsoft says that the default value for /passwordreq
, if a password is required, is yes, and it seems that Windows then assigns some default password (probably because a password isn't specified, maybe in particular because /active:no
).
And for your second sub-question, like you said in your second edit, the default, at least for Windows 8.1 Pro, seems to be a password expiry after 42 days, although it's certainly not enabled on my account OR the new cyg_server
account. This is probably because of the same combination - cyg_server
specifies a password and is active, but sshd doesn't specify a password and isn't active (perhaps this is to force a password being assigned if/when the account is activated). If you want to know the exact details, I'd probably try creating more similar accounts with the expiry off/specifying the password and seeing what happens.
add a comment |
As for why ssh-host-config
creates two user accounts is mostly answered by Dan. More on why a separate account is needed to setuid
can be found here, it's a complicated process.
As for your first sub-question, I believe it's defaults, too, like the password expiry - in /usr/share/csih/cygwin-service-installation-helper
, used by ssh-host-config, the user is created (using the Windows net command) like this, where $unpriv_user
is the name, like sshd, you selected, and $dos_var_empty
is the Windows/DOS style path to /var/empty
:
net user "$unpriv_user" /add /fullname:"$unpriv_user privsep"
"/homedir:$dos_var_empty" /active:no
The documentation by Microsoft says that the default value for /passwordreq
, if a password is required, is yes, and it seems that Windows then assigns some default password (probably because a password isn't specified, maybe in particular because /active:no
).
And for your second sub-question, like you said in your second edit, the default, at least for Windows 8.1 Pro, seems to be a password expiry after 42 days, although it's certainly not enabled on my account OR the new cyg_server
account. This is probably because of the same combination - cyg_server
specifies a password and is active, but sshd doesn't specify a password and isn't active (perhaps this is to force a password being assigned if/when the account is activated). If you want to know the exact details, I'd probably try creating more similar accounts with the expiry off/specifying the password and seeing what happens.
add a comment |
As for why ssh-host-config
creates two user accounts is mostly answered by Dan. More on why a separate account is needed to setuid
can be found here, it's a complicated process.
As for your first sub-question, I believe it's defaults, too, like the password expiry - in /usr/share/csih/cygwin-service-installation-helper
, used by ssh-host-config, the user is created (using the Windows net command) like this, where $unpriv_user
is the name, like sshd, you selected, and $dos_var_empty
is the Windows/DOS style path to /var/empty
:
net user "$unpriv_user" /add /fullname:"$unpriv_user privsep"
"/homedir:$dos_var_empty" /active:no
The documentation by Microsoft says that the default value for /passwordreq
, if a password is required, is yes, and it seems that Windows then assigns some default password (probably because a password isn't specified, maybe in particular because /active:no
).
And for your second sub-question, like you said in your second edit, the default, at least for Windows 8.1 Pro, seems to be a password expiry after 42 days, although it's certainly not enabled on my account OR the new cyg_server
account. This is probably because of the same combination - cyg_server
specifies a password and is active, but sshd doesn't specify a password and isn't active (perhaps this is to force a password being assigned if/when the account is activated). If you want to know the exact details, I'd probably try creating more similar accounts with the expiry off/specifying the password and seeing what happens.
As for why ssh-host-config
creates two user accounts is mostly answered by Dan. More on why a separate account is needed to setuid
can be found here, it's a complicated process.
As for your first sub-question, I believe it's defaults, too, like the password expiry - in /usr/share/csih/cygwin-service-installation-helper
, used by ssh-host-config, the user is created (using the Windows net command) like this, where $unpriv_user
is the name, like sshd, you selected, and $dos_var_empty
is the Windows/DOS style path to /var/empty
:
net user "$unpriv_user" /add /fullname:"$unpriv_user privsep"
"/homedir:$dos_var_empty" /active:no
The documentation by Microsoft says that the default value for /passwordreq
, if a password is required, is yes, and it seems that Windows then assigns some default password (probably because a password isn't specified, maybe in particular because /active:no
).
And for your second sub-question, like you said in your second edit, the default, at least for Windows 8.1 Pro, seems to be a password expiry after 42 days, although it's certainly not enabled on my account OR the new cyg_server
account. This is probably because of the same combination - cyg_server
specifies a password and is active, but sshd doesn't specify a password and isn't active (perhaps this is to force a password being assigned if/when the account is activated). If you want to know the exact details, I'd probably try creating more similar accounts with the expiry off/specifying the password and seeing what happens.
edited Oct 11 '16 at 17:22
chicks
3,07072033
3,07072033
answered Oct 20 '14 at 21:37
FlaemeFlaeme
411
411
add a comment |
add a comment |
The separate disabled sshd
account is actually not used in Cygwin (at least, not any more). I asked about this on the Cygwin mailing list:
Is the sshd disabled user account still required?
Corinna Vinschen (Cygwin maintainer) responded with the following:
No, actually it isn't. These days the sshd server checks if the the privsep chrrot [sic] environment should be used and that the process is started under "root:root". This never matches under Cygwin so we could drop the sshd user requirement.
(See https://cygwin.com/ml/cygwin/2019-01/msg00120.html)
Therefore the marked answer to this question is not correct for Cygwin.
(Probably someone will update the ssh-host-config
script at some point to drop the creation of the sshd
account.)
Update 4/18/2019
The above is correct in that the sshd
account is not strictly required. The only time you will still need it is if you want to use the ChrootDirectory
setting in sshd_config
to restrict an account to SFTP only.
FWIW, I created a package that provides an easy-to-use installer that configures the Cygwin version of OpenSSH (and a couple of other tools, including rsync
). It's on GitHub if anyone is interested:
https://github.com/Bill-Stewart/Cygwin-OpenSSH
The documentation in the package describes the circumstances in which the sshd
account is used.
add a comment |
The separate disabled sshd
account is actually not used in Cygwin (at least, not any more). I asked about this on the Cygwin mailing list:
Is the sshd disabled user account still required?
Corinna Vinschen (Cygwin maintainer) responded with the following:
No, actually it isn't. These days the sshd server checks if the the privsep chrrot [sic] environment should be used and that the process is started under "root:root". This never matches under Cygwin so we could drop the sshd user requirement.
(See https://cygwin.com/ml/cygwin/2019-01/msg00120.html)
Therefore the marked answer to this question is not correct for Cygwin.
(Probably someone will update the ssh-host-config
script at some point to drop the creation of the sshd
account.)
Update 4/18/2019
The above is correct in that the sshd
account is not strictly required. The only time you will still need it is if you want to use the ChrootDirectory
setting in sshd_config
to restrict an account to SFTP only.
FWIW, I created a package that provides an easy-to-use installer that configures the Cygwin version of OpenSSH (and a couple of other tools, including rsync
). It's on GitHub if anyone is interested:
https://github.com/Bill-Stewart/Cygwin-OpenSSH
The documentation in the package describes the circumstances in which the sshd
account is used.
add a comment |
The separate disabled sshd
account is actually not used in Cygwin (at least, not any more). I asked about this on the Cygwin mailing list:
Is the sshd disabled user account still required?
Corinna Vinschen (Cygwin maintainer) responded with the following:
No, actually it isn't. These days the sshd server checks if the the privsep chrrot [sic] environment should be used and that the process is started under "root:root". This never matches under Cygwin so we could drop the sshd user requirement.
(See https://cygwin.com/ml/cygwin/2019-01/msg00120.html)
Therefore the marked answer to this question is not correct for Cygwin.
(Probably someone will update the ssh-host-config
script at some point to drop the creation of the sshd
account.)
Update 4/18/2019
The above is correct in that the sshd
account is not strictly required. The only time you will still need it is if you want to use the ChrootDirectory
setting in sshd_config
to restrict an account to SFTP only.
FWIW, I created a package that provides an easy-to-use installer that configures the Cygwin version of OpenSSH (and a couple of other tools, including rsync
). It's on GitHub if anyone is interested:
https://github.com/Bill-Stewart/Cygwin-OpenSSH
The documentation in the package describes the circumstances in which the sshd
account is used.
The separate disabled sshd
account is actually not used in Cygwin (at least, not any more). I asked about this on the Cygwin mailing list:
Is the sshd disabled user account still required?
Corinna Vinschen (Cygwin maintainer) responded with the following:
No, actually it isn't. These days the sshd server checks if the the privsep chrrot [sic] environment should be used and that the process is started under "root:root". This never matches under Cygwin so we could drop the sshd user requirement.
(See https://cygwin.com/ml/cygwin/2019-01/msg00120.html)
Therefore the marked answer to this question is not correct for Cygwin.
(Probably someone will update the ssh-host-config
script at some point to drop the creation of the sshd
account.)
Update 4/18/2019
The above is correct in that the sshd
account is not strictly required. The only time you will still need it is if you want to use the ChrootDirectory
setting in sshd_config
to restrict an account to SFTP only.
FWIW, I created a package that provides an easy-to-use installer that configures the Cygwin version of OpenSSH (and a couple of other tools, including rsync
). It's on GitHub if anyone is interested:
https://github.com/Bill-Stewart/Cygwin-OpenSSH
The documentation in the package describes the circumstances in which the sshd
account is used.
edited Apr 18 at 19:53
answered Jan 17 at 15:09
Bill_StewartBill_Stewart
1837
1837
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f579630%2fwhy-does-ssh-host-config-create-two-users-in-cygwin-on-windows-8-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown