You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an ssh command with a proxy host (-J) parameter on a Mac, it tries to relaunch the command using exec. Before 7.3.0 this worked through a workaround exec file that was created in /usr/local/microsoft/powershell/7:
#!/usr/bin/env pwshparam($command)
&$command@args
Now, after 7.3.0 upgrade, with or without the "exec" file, the command returns an error whenever attempting to spawn a proxy command.
Expected behavior
(bash)$ ssh 10.1.0.12 -J proxyhost.local -vOpenSSH_8.6p1, LibreSSL 3.3.6debug1: Setting implicit ProxyCommand from ProxyJump: ssh -v -W '[%h]:%p' proxyhost.localdebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: Executing proxy command: exec ssh -v -W '[10.1.0.12]:22' proxyhost.localdebug1: identity file /Users/user/.ssh/id_rsa type 0debug1: identity file /Users/user/.ssh/id_rsa-cert type -1debug1: Local version string SSH-2.0-OpenSSH_8.6OpenSSH_8.6p1, LibreSSL 3.3.6debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: Connecting to proxyhost.local port 22.debug1: Connection established.
Actual behavior
PS> ssh 10.1.0.12 -J proxyhost.local -vOpenSSH_8.6p1, LibreSSL 3.3.6debug1: Setting implicit ProxyCommand from ProxyJump: /usr/bin/ssh -v -W '[%h]:%p' proxyhost.localdebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: Executing proxy command: exec /usr/bin/ssh -v -W '[10.1.0.12]:22' proxyhost.localdebug1: identity file /Users/user/.ssh/id_rsa type 0debug1: identity file /Users/user/.ssh/id_rsa-cert type -1debug1: Local version string SSH-2.0-OpenSSH_8.6debug1: kex_exchange_identification: banner line 0: \033[31;1mSwitch-Process: \033[31;1mA positional parameter cannot be found that accepts argument '/usr/bin/ssh'.\033[0mkex_exchange_identification: Connection closed by remote hostConnection closed by UNKNOWN port 65535
Error details
$null
Environment data
Name Value
---------
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 2920:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000
Platform Unix
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
When using an
sshcommand with a proxy host (-J) parameter on a Mac, it tries to relaunch the command usingexec. Before 7.3.0 this worked through a workaroundexecfile that was created in/usr/local/microsoft/powershell/7:Now, after 7.3.0 upgrade, with or without the "exec" file, the command returns an error whenever attempting to spawn a proxy command.
Expected behavior
Actual behavior
Error details
$nullEnvironment data
Visuals