PowerShell / PowerShell/Win32-OpenSSH
install-sshd.ps1 does not add path
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
8.1.0.0
Server OperatingSystem
n/a
Client OperatingSystem
Windows 10 Enterprise
What is failing
After installing using the install-sshd.ps1 none of the contained files is found, because the $env:path is not set.
Expected output
PS C:\SomePath> ssh
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]
Actual output
PS C:\Somepath> ssh
ssh : The term 'ssh' 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.
At line:1 char:1
- ssh
-
+ CategoryInfo : ObjectNotFound: (ssh:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Comment:
please add something like this to "install-sshd.ps1"
$path = [Environment]::GetEnvironmentVariable('Path', 'Machine')
$newpath = $path + ";" + $scriptdir
[Environment]::SetEnvironmentVariable("Path", $newpath, 'Machine')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading and running install-sshd.ps1 on Windows 10, then verify whether the installed OpenSSH commands are available from a new PowerShell prompt. Done means the script makes the contained commands discoverable through the machine PATH and ssh produces its usage output instead of a command-not-found error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100