SSH doesn't work in PowerShell except when powershell.exe launched through CMD
When I try to launch SSH from PowerShell on a fresh Cmder install I get the following error:
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.
Yet it works fine if I start up cmd, then launch powershell.exe from there, then run ssh.
Works for me. What version of cmder?
1.3.19, installed from Chocolatey
I'm wondering if not having OpenSSH installed is a part of it, but I've got a whole other issue when I try to use OpenSSH, which is that certain apps that generate a graphical console interface (e.g. mc, raspi-config, mutt) flicker so heavily they're unusable, but in native Cmder ssh they work fine. I'm trying to just use native Cmder ssh.
Cmder full or mini. Mini does not include ssh.
Openssh not installed is not an issue if usingg cmder full.
It's the full version.
Maybe the tab being used has some configuration that replaces the %PATH% variable, so that the ssh directory is no longer in the system path.
So I ran Get-Command through the cmd powershell and got this output:
CommandType: Application
Name: ssh.exe
Version: 0.0.0.0
Source: C:\Program Files\Git\usr\bin\ssh.exe
What I'm getting from this is that the PowerShell being invoked from ConEmu isn't registering the path, but it is for cmd, and based on my examination of the Cmder included cmd shell vs. the ConEmu default cmd shell, may have something to do with %ConEmuDir%\..\init.bat not being invoked by the PowerShell task.
My bad. I've been following this from my phone and I misread it. I have duplicated the issue snd will try and resolve it.
Have you tried the latest unreleased build?
https://ci.appveyor.com/api/buildjobs/xhdkfq5ic63jamvv/artifacts/build%2Fcmder.zip
Trying it now, no joy so far.
I seem to have made a workaround by adding
set PATH=%ProgramFiles%\Git\usr\bin;%PATH%
to the environment paths.
That's not a fix. Git is already there in %cmder_root%/vendor/git-for-windows.
You could have added folders that Cmder is supposed to be finding and adding but is not to the path.
The fix is to fix cmders init scripts so they do this. I will work on it as time allows and let you know.
Edit: See my post 2 down from here. THis is fixed in the unreleased code.
I just realized this but I think Powershell init scripts are different than cmd init scripts and may not add the folders that contain ssh and other utilities to the path. I need to confirm this.
Edit: The above statement is incorrect
I just downloaded the unreleased build and it seems to work fine. In the screenshot below I launched Cmder which started a cmd.exe based Cmder session. I then used the
to launch a Powershell.exe based Cmder session to the right of the initial session. I did not start Powershell from the Cmder cmd.exe shell.

Hmm. I wonder if it's some way my Windows is set up.