Skip to content
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

Can this be installed on Server 2008 Standard SP2? #818

Closed
HSSupport opened this issue Jul 20, 2017 · 10 comments
Closed

Can this be installed on Server 2008 Standard SP2? #818

HSSupport opened this issue Jul 20, 2017 · 10 comments

Comments

@HSSupport
Copy link

OpenSSH Version 0.16 - installed using chocolatey installer (barebones)

after installation, the service cannot be started with the user SSHD. Since managed service accounts were introduced in server 2008 R2, does this mean that this will not install on server 2008 standard?

thanks

@bingbing8
Copy link
Contributor

win32-openssh support down to win7 client or windows server 2008 R2

@HSSupport
Copy link
Author

HSSupport commented Jul 21, 2017

Hi

i created a user (DOMAIN\SSHD) and edited the chocolately package to change all instances of "NT Service\SSHD" to the new username.

the install was successful.

when i run SSHD.exe -d from an admin powershell, i can connect, however when i run the service i get "write failed - broken pipe"

now, i know that this is "not supported" on Server 2008 SP2, however any nudges in the right direction would be appreciated :)

EDIT: Debug Log shows:

2384 10:28:14:332 debug1: server_input_channel_req: channel 0 request shell reply 1
2384 10:28:14:332 debug1: session_by_channel: session 0 channel 0
2384 10:28:14:332 debug1: session_input_channel_req: session 0 req shell
2384 10:28:14:332 Starting session: shell on console for [email protected] from 192.168.WWW.YYY port 41014 id 0
2384 10:28:14:332 debug1: Executing command: C:\Program Files\OpenSSH-Win64\ssh-shellhost.exe
2384 10:28:14:332 fatal: ERROR. Cannot create process (1349).\n
2384 10:28:14:332 debug1: do_cleanup
2384 10:28:14:332 debug1: session_pty_cleanup: session 0 release console

note the single error, this does not work (broken pipe)

running sshd.exe -d i receive:

debug1: Executing command: C:\Program Files\OpenSSH-Win64\ssh-shellhost.exe
debug1: Recieved SIGCHLD

which works.
thanks

@manojampalam
Copy link
Contributor

1349 - The type of the token is inappropriate for its attempted use.

Not sure why you are seeing this. Can you try running sshd as SYSTEM and see if it work?
sc.exe config sshd obj= localsystem

@fpqc
Copy link

fpqc commented Jul 24, 2017

Why did you change the service to run as an ordinary domain user? The service needs to run at a high privilege level (System Service), even though the individual users will be authenticating against the domain.

SSHD is also not meant to be run directly in a console but through the sshd service (with sc.exe start/stop sshd).

@HSSupport
Copy link
Author

@fpqc
the user is a domain admin, i shall shortly try running as localsystem as recommended by @manojampalam

@fpqc
Copy link

fpqc commented Jul 24, 2017

@HSSupport Tell him to uninstall the edited package and reinstall it so it installs as a system service. What @manojampalam suggested is just undoing the error that the user made in the first place.

sshd runs as a localsystem-level service, but all authentication is carried through the server's authentication mechanism and permissions are enforced at the user level.

@HSSupport
Copy link
Author

@fpqc
sorry, i think i caused some confusion:

I installed this package. since its server 2008 (standard, not R2) it wont install as the NT Authority\SSHD user. So ill be trying the localsystem next, and also localservice to see which works.

the domain\sshd user was my workaround for a lack of service managed accounts :) thanks

@fpqc
Copy link

fpqc commented Jul 24, 2017

@HSSupport Ah, that makes some sense. It might actually work then. Also, yeah, the domain admin token can be elevated to a system level token using the windows internals psexec tool (i.e. Admin -> SYSTEM is not a security boundary), but it is a permissions boundary and likely the cause of failure here.

This TechNet page also includes instructions for manually configuring Managed Service accounts on earlier versions of Windows Server (2003 and 2008) if they are using the updated AD Schema.

https://technet.microsoft.com/en-us/library/dd548356.aspx

@HSSupport
Copy link
Author

HSSupport commented Jul 24, 2017

ok so i have an update.

The service flat-out would not start using NT Authority\LocalService account
it does work if you replace "NT Authority\SSHD" with "NT Authority\SYSTEM" and run the chocolatey installer, however something goes wrong at authentication: all forms fail. (note, using \localsystem produces the exact same error)

i think this may have gone from "easily fixed" to "probably not going to work ever".... logs below

if you can have a quick look and let me know what you think / if its easily possible to get this to run/work on Server 2008 SP2, i would be grateful, but i also accept this may not be possible (at least i/we/you tried!)

thanks

Logs note: i have the correct ssh key in place, and used the correct password 3x. this is a member server of a domain

2884 10:42:27:574 debug1: Forked child 2844.
2844 10:42:42:606 debug1: sshd version OpenSSH_7.5, LibreSSL 2.5.3
2844 10:42:42:653 debug1: private host key #0: ssh-rsa SHA256:5Fyhj/0z+V8Nito1hgyA
2844 10:42:42:653 debug1: private host key #1: ssh-dss SHA256:XcuzyzeZpycEpgA
2844 10:42:42:653 debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:1bedKRzj3byW+P2b4+ZJb0HN4
2844 10:42:42:653 debug1: private host key #3: ssh-ed25519 SHA256:58fxaMcndYc/44mPIGvU
2844 10:42:42:653 debug1: child socket: 312
2844 10:42:42:653 debug1: child startup_pipe: 316
2844 10:42:42:653 Connection from AAA.BBB.CCC.25 port 47656 on AAA.BBB.CCC.80 port 2358
2844 10:42:42:668 debug1: Client protocol version 2.0; client software version OpenSSH_6.6.1
2844 10:42:42:668 debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
2844 10:42:42:668 debug1: Local version string SSH-2.0-OpenSSH_7.5
2844 10:42:42:668 debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
2844 10:42:42:668 debug1: SSH2_MSG_KEXINIT sent
2844 10:42:42:668 debug1: SSH2_MSG_KEXINIT received
2844 10:42:42:668 debug1: kex: algorithm: [email protected]
2844 10:42:42:668 debug1: kex: host key algorithm: ecdsa-sha2-nistp256
2844 10:42:42:668 debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
2844 10:42:42:668 debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
2844 10:42:42:668 debug1: expecting SSH2_MSG_KEX_ECDH_INIT
2844 10:42:42:684 debug1: rekey after 4294967296 blocks
2844 10:42:42:684 debug1: SSH2_MSG_NEWKEYS sent
2844 10:42:42:684 debug1: expecting SSH2_MSG_NEWKEYS
2844 10:42:42:700 debug1: SSH2_MSG_NEWKEYS received
2844 10:42:42:700 debug1: rekey after 4294967296 blocks
2844 10:42:42:700 debug1: KEX done
2844 10:42:42:903 debug1: userauth-request for user XX.local\YY service ssh-connection method none
2844 10:42:42:903 debug1: attempt 0 failures 0
2844 10:42:42:903 reprocess config line 45: Deprecated option RSAAuthentication
2844 10:42:47:950 Failed none for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2
2844 10:42:47:950 debug1: userauth-request for user XX.local\YY service ssh-connection method publickey
2844 10:42:47:950 debug1: attempt 1 failures 0
2844 10:42:57:701 debug1: auth agent did not authorize client XX.local\YY
2844 10:42:57:701 Failed publickey for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2: RSA SHA256:cWRbogIsue8Z37E
2844 10:42:57:701 debug1: userauth-request for user XX.local\YY service ssh-connection method keyboard-interactive
2844 10:42:57:701 debug1: attempt 2 failures 1
2844 10:42:57:701 debug1: keyboard-interactive devs
2844 10:42:57:701 debug1: auth2_challenge: user=XX.local\YY devs=
2844 10:42:57:701 debug1: kbdint_alloc: devices ''
2844 10:42:57:701 Failed keyboard-interactive for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2
2844 10:43:37:970 debug1: userauth-request for user XX.local\YY service ssh-connection method password
2844 10:43:37:970 debug1: attempt 3 failures 2
2844 10:43:37:970 debug1: auth agent did not authorize client XX.local\YY
2844 10:43:37:970 Failed password for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2
2844 10:43:40:611 debug1: userauth-request for user XX.local\YY service ssh-connection method password
2844 10:43:40:611 debug1: attempt 4 failures 3
2844 10:43:40:611 debug1: auth agent did not authorize client XX.local\YY
2844 10:43:40:611 Failed password for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2
2844 10:43:42:736 debug1: userauth-request for user XX.local\YY service ssh-connection method password
2844 10:43:42:736 debug1: attempt 5 failures 4
2844 10:43:42:736 debug1: auth agent did not authorize client XX.local\YY
2844 10:43:42:736 Failed password for XX.local\YY from AAA.BBB.CCC.25 port 47656 ssh2
2844 10:43:42:736 Connection closed by authenticating user XX.local\YY AAA.BBB.CCC.25 port 47656
2844 10:43:42:736 debug1: do_cleanup

@maertendMSFT
Copy link
Collaborator

Server 2008 is out of support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants