-
Notifications
You must be signed in to change notification settings - Fork 784
install-sshlsa.ps1 does not work on Windows 2008 R2 Update 1 (64 bit) #189
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
I think this is a related issue #142 |
Looks like the install is only tested on Server 2012 R2 since the install wiki pages also uses New-NetFirewallRule - which is not available on Server 2008. This netsh command works on both: netsh advfirewall firewall add rule name='SSHD Port win32-openssh' dir=in action=allow protocol=TCP localport=22 I was going to suggest that you use the chocolatey package, however, Chocolatey will install .NET 4.0 as a pre-requisite, which also seems to be the version of .NET that contains OpenBaseKey: https://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.openbasekey(v=vs.110).aspx |
mark this problem, it was happened to me, and i use python to change the reg and it would be work well. |
WORKAROUNDS Open regedit.exe ==================
To uninstall
|
After doing what @manojampalam said about adding the reg and opening the port on the firewall (it was opened but did it again in case) I still get (server log): The dll has been copied to %windir%\System32 (I am using Windows Server 2008 r2) |
@manojampalam i have changed the steps which u have mentioned and now the pc display is not coming ,could please help me with that |
Hi, I've found the same issue when installing on w2k3 32 bit also. Is the registry add safe to use? |
Keep in mind the all the commands given in the wiki and the scripts assume you only have the default msv1_0 in the key currently. The code in the chocolatey package preserves all values that might be in the key, both during install and uninstall. |
reg add HKLM\System\CurrentControlSet\Control\Lsa /v "Authentication Packages" /t REG_MULTI_SZ /d msv1_0\0ssh-lsa -f works for me (note .dll is missing). |
If after applying the registry update you still experience the issue, try updating .NET and WMI, that fixed this error for me. Immediately after fixing that, I found that I could not run the install-sshlsa.ps1 script because 'ssh-lsa.dll is in use by another process'. This was because adding the reg key and restarting appears to cause lsass.exe to use the DLL (confirmed with "tasklist /m ssh-lsa.dll"). To solve, remove the extra line from the reg key, reboot, THEN run install-sshlsa.ps1. |
Does anyone have a solution to this problem? |
@RodTrevisan - can you try the latest chocolatey package? You can also run the install script of the chocolatey package without using chocolatey, see "complete offline install" here: https://github.com/DarwinJS/ChocoPackages/blob/master/openssh/readme.md |
@scherma I have recently run into the same issue installing on Server 2016, but I did not have to doing any registry edits to get there. However, looking at the registry, I do see that the Authentication Packages key with a value of msv1_0 ssh-lsa has been added after installation of the recent version of OpenSSH (v0.0.10.0 - March 14, 2017). So to complete the key-authorization package installation and get around the ssh-lsa.dll in use error, I can remove the entry, reboot, run the install-sshlsa.ps1 process, then re-add the registry entry for the Authentication Packages? The SFTP is in use with domain accounts (username/password), but we are adding clients that require key authentication so I need to get it activated and working. |
The original problem was the script was using an API not available on Server 2008 R2. The Chocolatey Package handles both of these situations. The install script inside the Chocolatey Package can be run WITHOUT Chocolatey. The chocolatey package is at: https://chocolatey.org/packages/openssh |
@DarwinJS The package does not install due to the following error: ERROR: Method invocation failed because [System.Boolean] does not contain a method named 'split'. The install of openssh was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\openssh\tools\chocolateyinstall.ps1'. |
@SamuelOrlando - I just had a clean test on Server 2016 Core - but I am concerned about your error as it might affect others as well. From a failing instance, could you please
Files: Thanks, |
@DarwinJS Looks like we are going another route for SSH+FTP solutions. I will not be able to follow up. |
@SamuelOrlando - I know you mentioned you've moved on to other SSH - but wanted you to know your reported error with the chocolatey package was related to DarwinJS/ChocoPackages#23. This bug is squashed in version 0.0.10.20170329 - which is in automated moderation. |
This issue and #142 (closed with reference back here) both seem to be tracking two independent issues. The first one "[Microsoft.Win32.RegestryKey] doesn't contain a method named 'OpenBaseKey'" appears to be a problem with the original install-sshlsa.ps1 calling a registry api not available on a DEFAULT Server 2008 build (no .NET upgrades) ? The second one is "Copy-Item : The process cannot access the file 'C:\Windows\system32\ssh-lsa.dll' because it is being used by another process." - which is when install-sshlsa.ps1 is attempted to be used when upgrading ssh-lsa.dll which cannot work because the dll is loaded in memory. The manual work around would be to:
The chocolatey package should handle both of these problems. I think the first problem could be fixed in install-sshlsa.ps1 with this code (which appears to work on server 2008): https://github.com/DarwinJS/ChocoPackages/blob/master/openssh/tools/chocolateyinstall.ps1#L402-L414 |
ssh-lsa.dll has been deprecated, issues listed above are no longer applicable |
Uh oh!
There was an error while loading. Please reload this page.
I am using release 4_5_2016
The text was updated successfully, but these errors were encountered: