Title: ssh command can't spawn a proxy command via "exec" from a pwsh 7.3.0 session · Issue #18561 · PowerShell/PowerShell · GitHub
Open Graph Title: ssh command can't spawn a proxy command via "exec" from a pwsh 7.3.0 session · Issue #18561 · PowerShell/PowerShell
X Title: ssh command can't spawn a proxy command via "exec" from a pwsh 7.3.0 session · Issue #18561 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18561
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ssh command can't spawn a proxy command via \"exec\" from a pwsh 7.3.0 session ","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nWhen 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`:\r\n```powershell\r\n#!/usr/bin/env pwsh\r\nparam($command)\r\n\r\n\u0026 $command @args\r\n```\r\n\r\nNow, after 7.3.0 upgrade, with or without the \"exec\" file, the command returns an error whenever attempting to spawn a proxy command.\r\n\r\n### Expected behavior\r\n\r\n```console\r\n(bash)$ ssh 10.1.0.12 -J proxyhost.local -v\r\nOpenSSH_8.6p1, LibreSSL 3.3.6\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -v -W '[%h]:%p' proxyhost.local\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: Executing proxy command: exec ssh -v -W '[10.1.0.12]:22' proxyhost.local\r\ndebug1: identity file /Users/user/.ssh/id_rsa type 0\r\ndebug1: identity file /Users/user/.ssh/id_rsa-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.6\r\nOpenSSH_8.6p1, LibreSSL 3.3.6\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: Connecting to proxyhost.local port 22.\r\ndebug1: Connection established.\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nPS\u003e ssh 10.1.0.12 -J proxyhost.local -v\r\nOpenSSH_8.6p1, LibreSSL 3.3.6\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: /usr/bin/ssh -v -W '[%h]:%p' proxyhost.local\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: Executing proxy command: exec /usr/bin/ssh -v -W '[10.1.0.12]:22' proxyhost.local\r\ndebug1: identity file /Users/user/.ssh/id_rsa type 0\r\ndebug1: identity file /Users/user/.ssh/id_rsa-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.6\r\ndebug1: 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[0m\r\nkex_exchange_identification: Connection closed by remote host\r\nConnection closed by UNKNOWN port 65535\r\n```\r\n\r\n\r\n### Error details\r\n\r\n```console\r\n$null\r\n```\r\n\r\n\r\n### Environment data\r\n\r\n```powershell\r\nName Value\r\n---- -----\r\nPSVersion 7.3.0\r\nPSEdition Core\r\nGitCommitId 7.3.0\r\nOS Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n\r\n","author":{"url":"https://github.com/nvarscar","@type":"Person","name":"nvarscar"},"datePublished":"2022-11-14T23:58:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/18561/PowerShell/issues/18561"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eb95ad09-a613-2967-516e-2961a37a5bd2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7C0:39636B:9F3C22:E84383:6A589F31 |
| html-safe-nonce | 56229786413a68df49a8e5ea940724e28a7975ac8e68d56ef64f009ede036a26 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0MwOjM5NjM2Qjo5RjNDMjI6RTg0MzgzOjZBNTg5RjMxIiwidmlzaXRvcl9pZCI6IjEyMzYxMzQxNTI2OTg4OTYxNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9d87aac5386cbc5b7394a0eed89298516d946c747b5ec563821cf7ee8c7c4377 |
| hovercard-subject-tag | issue:1448944711 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/18561/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16aaa23f882eb16aebb8effade61b0908686da78941e3d2c3f4f834de5cc9085/PowerShell/PowerShell/issues/18561 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16aaa23f882eb16aebb8effade61b0908686da78941e3d2c3f4f834de5cc9085/PowerShell/PowerShell/issues/18561 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nvarscar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width