-
Notifications
You must be signed in to change notification settings - Fork 784
Compat issues on Nano Server #234
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
ntrights is no longer used in the latest version (still in moderation: https://chocolatey.org/packages/win32-openssh/2016.05.30). This was done for nano compatibility. However, I am still working on eliminating psexec.exe which is also not compatible with nano. Both ntrights.exe and psexec.exe were introduced as part of the official installation process with version 2015_05_15. I will keep driving toward nano compat. |
Is there any instructions page which describes how to deploy openssh on Nano Server? Ideally without compiling it by myself? |
How I did it:
SSH and SFTP works out of the box. Arrows, TAB and colors don't. Running powershell from ssh gives strange results and no error output, but it is still usable. |
@Nomad1 Great, that solved it within a running Nano server instance. Has anyone tried to deploy this onto an offline vhd/vhdx image with DISM or other tools, so that I can already have it running on a newly created VM? This would be very useful. |
FYI I am working on making the chocolateyinstall scripts compatible with Nano and will include a jump start script that calls it without chocolatey being installed. |
I was able to deploy OpenSSH on nano server. Able to ssh also to the nano server. But is there any way or link where I can understand whether ssh can work without password? I have tried modifying the sshd/ssh configuration files but every time I get a password prompt. |
On psexec: I copied psexec64 to Nano's %SYSTEMROOT%\System32 folder. Then I started to a local cmd on Nano by running "start cmd" from the remote PowerShell connection I had open to Nano. I then switched to the Nano vm's console, and ran "psexec64 -s cmd", which worked. This allowed me to carry out the key registrations under step 6 in the installation instructions on https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH. Testing an ssh connection from my Mac to the Nano vm worked ok. |
I believe this bit of code does the key registration on nano without psexec.exe. Would be great to get confirmation of it by anyone who has a nano setup to test with (including testing the resultant server install: And this code does the rights assignment without ntrights.exe: |
@DarwinJS : just ran chocolateyinsall on a Nano server and it breaks because Invoke-WebRequest is not available in Nano (https://technet.microsoft.com/en-us/windows-server-docs/compute/nano-server/powershell-on-nano-server). "[10.60.5.178]: PS C:\temp> .\chocolateyinstall.ps1 |
Sorry - it is a known issue that chocolatey itself cannot run on Nano. I meant for someone to run those two code segments independently to see if they work. I am working on a wrapper script around ChocolateyInstall.ps1 that would allow it to run in Nano and create the same install - but without Chocolatey being present - this will be a gradual process. |
I believe I have a working install script for Nano - at least it worked in my testing. It uses the same code as I put together for the chocolatey package - but does not require chocolatey nor wow64 nor does it require adding .NET Core to a bare Nano instance. To use it, you download the chocolatey package, extract it and copy the \tools folder to your nano instance. (using "Copy-Item -ToSession") Then run ..\tools\barebonesinstaller.ps1 -SSHServerFeature Calling this code does not require chocolatey to be installed and it does not use any 32-bit EXEs. Uninstall is: ..\tools\barebonesinstaller.ps1 -SSHServerFeature -Uninstall Use "get-help ..\tools\barebonesinstaller.ps1" for a few more details. Here is the code - it calls chocolateyinstall.ps1 which contains logic to run standalone outside of chocolatey: https://github.com/DarwinJS/ChocoPackages/blob/master/win32-openssh/2016.05.30.20160908/tools/barebonesinstaller.ps1 |
@DarwinJS : works like a charm, thanks! :) |
@DarwinJS: when trying to use ssh-copy-id from my Mac to setup key-based authentication, I'm getting:
Can you help enabling key-based authentication on Nano? |
I am still trying to understand what would be involved through questions in this thread: #341 - specifically concerned about the possible challenge of getting this workflow to enter "system" context on the remote machine if that is necessary. |
FYI to all - Chocolatey package and it's built-in barebonesinstaller.ps1 are tested and working on Nano RTM. https://github.com/DarwinJS/ChocoPackages/blob/master/openssh/readme.md |
Thanks so much for all the help @DarwinJS. Just got 0.0.0.9 working on a Nano box with your process and installer script. We're currently working through some of the problems introduced with 0.0.1.0 (which, heads up to everyone, doesn't currently work with Nano). |
Glad it is helpful - I am curious which offline install method you chose and why. |
I'm not sure I understand...I just followed your intstructions here because I had an RTM Nano build without Invoke-WebRequest. If you're asking how I fetched the nupkg, I have the Chocolatey repo registered as a PackageManagement repository, and I just used |
Yes that is what I was asking. Cool. You can now do it over the wire in a Nano remote session without doing the save and file copy first by using the method under "Installing on Nano Over the Wire w/out Chocolatey Nor .NET Core Installed (should work for Server 2016 as well)" in this document: https://github.com/DarwinJS/ChocoPackages/blob/master/openssh/readme.md |
install-sshd.ps1 should work on Nano with March End release |
Uh oh!
There was an error while loading. Please reload this page.
Issue list:
Work around:
sc.exe config sshd obj= LocalSystem
The text was updated successfully, but these errors were encountered: