Skip to content

How to know if I have Win32-OpenSSH installed? #1573

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

Closed
NealWalters opened this issue Mar 20, 2020 · 5 comments
Closed

How to know if I have Win32-OpenSSH installed? #1573

NealWalters opened this issue Mar 20, 2020 · 5 comments

Comments

@NealWalters
Copy link

How can I verify if this is the source for the OpenSSH software that we are running. The guy that installed it left.

Our install directory is called: e:\Install\OpenSSH-Win64\OpenSSH-Win64 which I think might be the 64-bit build of what you provide here. Is there anything in that directory that will give me a version number? I tried looking for "ssh -v" or something like that.

((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
says "PS C:\Windows\system32> ((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
Get-Command : The term 'sshd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again."

@bagajjal
Copy link
Collaborator

bagajjal commented Mar 20, 2020

Please try these,

  1. cd to sshd directory (cd e:\Install\OpenSSH-Win64\OpenSSH-Win64)
  2. ((Get-Item (Get-Command .\sshd).Source).VersionInfo.FileVersion)
  3. .\ssh.exe -V

@NealWalters
Copy link
Author

For #2: Same as I reported in the original post:
The term '.\sshd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.

For #3: From Dos Command Prompt:

OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.5

But I don't see that release number on your release page here:
https://github.com/PowerShell/Win32-OpenSSH/releases

That looks like my answer. However, there was no -v (lowercase or upper case listed when I saw the usage) when I earlier tried:

ssh -v
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
[-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
[-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
[-i identity_file] [-J [user@]host[:port]] [-L address]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q query_option] [-R address] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] destination [command]

@bagajjal
Copy link
Collaborator

For #3: From Dos Command Prompt:

OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.5

7.9p1 corresponds to https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v7.9.0.0p1-Beta release.

ssh -v
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]

V is mentioned here. I have made it bold.

Looks like there is some issue.

Please try with full path of binary name

  1. dir e:\Install\OpenSSH-Win64\OpenSSH-Win64\sshd.exe
  2. ((Get-Item (Get-Command e:\Install\OpenSSH-Win64\OpenSSH-Win64\sshd.exe).Source).VersionInfo.FileVersion)
  3. &"e:\Install\OpenSSH-Win64\OpenSSH-Win64\ssh.exe" -V

If the path name in step 1 is different then make changes in step 2 & 3.
Step2 will give the full 4 digit version that is shown on our release page.

@bagajjal
Copy link
Collaborator

All this command does is to retrieve the version number from sshd.exe file properties.
If you still have issue with command line then select the sshd.exe, right click to get properties and select details tab.

It looks like this

image

@NealWalters
Copy link
Author

Perfect, thanks!

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

2 participants