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

Provide a way to confirm the fix folder permissions for programdata\ssh installation prompt to allow for a silent installation #1916

Closed
rgl opened this issue Mar 19, 2022 · 12 comments
Assignees
Milestone

Comments

@rgl
Copy link

rgl commented Mar 19, 2022

After PowerShell/openssh-portable#549, install-ssh.ps1 now prompts the user to confirm the fix the programdata\ssh folder permissions but that does not allow for a silent installation.

Please provide a way to call install-sshd.ps1 with a -Confirm:$false parameter, just like we can do with FixHostFilePermissions.ps1 -Confirm:$false.

@rgl
Copy link
Author

rgl commented Mar 23, 2022

I've just tried the new version, but install-sshd.ps1 -Confirm:$false is not working:

PS C:\Program Files\OpenSSH> .\install-sshd.ps1 -Confirm:$false
C:\Program Files\OpenSSH\install-sshd.ps1 : Cannot bind parameter because parameter 'confirm' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array
syntax. For example, "-parameter value1,value2,value3".
At line:1 char:1
+ .\install-sshd.ps1 -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [install-sshd.ps1], ParameterBindingException
    + FullyQualifiedErrorId : ParameterAlreadyBound,install-sshd.ps1


PS C:\Program Files\OpenSSH> .\sshd.exe --version
unknown option -- -
OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3
usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]
            [-E log_file] [-f config_file] [-g login_grace_time]
            [-h host_key_file] [-o option] [-p port] [-u len]

Can you please re-open this issue?

@bagajjal
Copy link
Collaborator

@rgl - I think you are trying on the windows powershell. Can you try it on powershell 7+

@rgl
Copy link
Author

rgl commented Mar 23, 2022

I can, but older Windows versions (e.g. Windows 2019) do not ship PowerShell 7 out-of-the-box. So I would say these scripts should target Windows PowerShell 5.1.

@bagajjal bagajjal reopened this Mar 23, 2022
@rgl
Copy link
Author

rgl commented Mar 23, 2022

@bagajjal, I confirm that it works correctly with PowerShell 7.2.2.

@bagajjal
Copy link
Collaborator

Thanks @rgl. We will fix this for windows PowerShell.

@max06
Copy link

max06 commented Mar 24, 2022

I just spent half a day searching for whatever broke our unattended windows (2019) image builds... :(

Any ETA for a fix? Should I pin our scripts to the previous version or is this a matter of hours?

@rgl
Copy link
Author

rgl commented Mar 24, 2022

@max06 IMHO, if you are sad after something breaks, always pin your dependencies. And upgrade at your own pace, when you can afford the time.

@max06
Copy link

max06 commented Mar 24, 2022

@max06 IMHO, if you are sad after something breaks, always pin your dependencies.

You're right. Full ack.
But we're building windows server images here to be used by customers on a regular schedule, Those should contain the latest releases, including security fixes. I have no issues with failing builds, it's fine if a shortterm bug blocks us for some days. This is just a bad timing because I'm currently rebuilding our CI pipeline...

@dhs-rec
Copy link

dhs-rec commented Sep 8, 2022

Any idea about when this will be released?

@tgauth
Copy link
Collaborator

tgauth commented Sep 12, 2022

Any idea about when this will be released?

This was released with v8.9.1.0p1-Beta - https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.9.1.0p1-Beta

@dhs-rec
Copy link

dhs-rec commented Sep 13, 2022

@tgauth, no, it wasn't. This issue was reopened after that release.

@tgauth
Copy link
Collaborator

tgauth commented Sep 13, 2022

Ah, yes - sorry about that, the issue was reopened to fix for Windows PowerShell. I don't know the date for the next release yet.

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

No branches or pull requests

5 participants