Title: Immediate disconnect when sshing to host with /snap/bin/pwsh set as default shell · Issue #9842 · PowerShell/PowerShell · GitHub
Open Graph Title: Immediate disconnect when sshing to host with /snap/bin/pwsh set as default shell · Issue #9842 · PowerShell/PowerShell
X Title: Immediate disconnect when sshing to host with /snap/bin/pwsh set as default shell · Issue #9842 · PowerShell/PowerShell
Description: I'm not sure if this is a snap-specific issue, but if so, I see discussion here about only providing powershell core for non-lts systems as a snap: #7310 Steps to reproduce Configure /snap/bin/pwsh as default shell for active directory u...
Open Graph Description: I'm not sure if this is a snap-specific issue, but if so, I see discussion here about only providing powershell core for non-lts systems as a snap: #7310 Steps to reproduce Configure /snap/bin/pwsh...
X Description: I'm not sure if this is a snap-specific issue, but if so, I see discussion here about only providing powershell core for non-lts systems as a snap: #7310 Steps to reproduce Configure /snap/bin/...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/9842
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Immediate disconnect when sshing to host with /snap/bin/pwsh set as default shell","articleBody":"I'm not sure if this is a snap-specific issue, but if so, I see discussion here about only providing powershell core for non-lts systems as a snap: https://github.com/PowerShell/PowerShell/issues/7310\r\n\r\n\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n\r\n-->\r\n\r\n# Steps to reproduce\r\n\r\n- Configure `/snap/bin/pwsh` as default shell for active directory users in `/etc/sssd/sssd.conf`.\r\n - `default_shell = /snap/bin/pwsh`\r\n- Attempt to ssh from one machine to another\r\n\r\n```\r\nssh -v target\r\n```\r\n\r\n# Expected behavior\r\n\r\nTo get a powershell prompt on the remote machine\r\n\r\n# Actual behavior\r\n\r\nssh session spits out some snap information and immediately disconnects\r\n\r\n# Troubleshooting steps / workarounds\r\n\r\nI tried just specifying -t, `ssh -t laptop` but that has the same behavior.\r\n\r\nIf I specify 'pwsh' as a command for ssh like `ssh -t laptop pwsh` then I do get a powershell prompt (`ssh -t laptop /snap/bin/pwsh` also works). But it would be really nice not to have to specify pwsh.\r\n\r\n```\r\n/home/jon> ssh -t laptop pwsh\r\nPowerShell 6.2.1\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\n\r\nhttps://aka.ms/pscore6-docs\r\nType 'help' to get help.\r\n\r\n/home/jon> hostname\r\nlaptop\r\n```\r\n\r\n\r\n# Environment data\r\n\r\nUbuntu 19.04, Active Directory authentication enabled per [this doc](https://help.ubuntu.com/lts/serverguide/sssd-ad.html.en)\r\nPowershell installed via [this Powershell Snap](https://snapcraft.io/powershell)\r\n\r\n$PSVersionTable\r\n```\r\nName Value\r\n---- -----\r\nPSVersion 6.2.1\r\nPSEdition Core\r\nGitCommitId 6.2.1\r\nOS Linux 5.0.0-16-generic #17-Ubuntu SMP Wed May 15 10:52:21 UTC 2019\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\nSSH Verbose Logging\r\n```\r\n/home/jon> ssh -v laptop\r\nOpenSSH_7.9p1 Ubuntu-10, OpenSSL 1.1.1b 26 Feb 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: Connecting to laptop [2600:.....] port 22.\r\ndebug1: connect to address 2600:..... port 22: No route to host\r\ndebug1: Connecting to laptop [192......] port 22.\r\ndebug1: Connection established.\r\ndebug1: identity file /home/jon/.ssh/id_rsa type 0\r\ndebug1: identity file /home/jon/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /home/jon/.ssh/id_dsa type -1\r\ndebug1: identity file /home/jon/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /home/jon/.ssh/id_ecdsa type -1\r\ndebug1: identity file /home/jon/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /home/jon/.ssh/id_ed25519 type -1\r\ndebug1: identity file /home/jon/.ssh/id_ed25519-cert type -1\r\ndebug1: identity file /home/jon/.ssh/id_xmss type -1\r\ndebug1: identity file /home/jon/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.9p1 Ubuntu-10\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Ubuntu-10\r\ndebug1: match: OpenSSH_7.9p1 Ubuntu-10 pat OpenSSH* compat 0x04000000\r\ndebug1: Authenticating to laptop:22 as 'jon'\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: \u003cimplicit> compression: none\r\ndebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: \u003cimplicit> compression: none\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:.....\r\ndebug1: Host 'laptop' is known and matches the ECDSA host key.\r\ndebug1: Found key in /home/jon/.ssh/known_hosts:7\r\ndebug1: rekey after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: rekey after 134217728 blocks\r\ndebug1: Will attempt key: /home/jon/.ssh/id_rsa RSA SHA256:..... agent\r\ndebug1: Will attempt key: /home/jon/.ssh/id_dsa \r\ndebug1: Will attempt key: /home/jon/.ssh/id_ecdsa \r\ndebug1: Will attempt key: /home/jon/.ssh/id_ed25519 \r\ndebug1: Will attempt key: /home/jon/.ssh/id_xmss \r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=\u003cssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering public key: /home/jon/.ssh/id_rsa RSA SHA256:..... agent\r\ndebug1: Server accepts key: /home/jon/.ssh/id_rsa RSA SHA256:..... agent\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to laptop ([192......]:22).\r\ndebug1: channel 0: new [client-session]\r\ndebug1: Requesting no-more-sessions@openssh.com\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: network\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug1: Remote: /home/jon/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding\r\ndebug1: Remote: /home/jon/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_US.UTF-8\r\nWelcome to Ubuntu 19.04 (GNU/Linux 5.0.0-16-generic x86_64)\r\n\r\n * Documentation: https://help.ubuntu.com\r\n * Management: https://landscape.canonical.com\r\n * Support: https://ubuntu.com/advantage\r\n\r\n * Ubuntu's Kubernetes 1.14 distributions can bypass Docker and use containerd\r\n directly, see https://bit.ly/ubuntu-containerd or try it now with\r\n\r\n snap install microk8s --classic\r\n\r\n0 updates can be installed immediately.\r\n0 of these updates are security updates.\r\n\r\nLast login: Thu Jun 6 10:05:45 2019 from 192.168.10.102\r\nThe snap command lets you install, configure, refresh and remove snaps.\r\nSnaps are packages that work across many different Linux distributions,\r\nenabling secure delivery and operation of the latest apps and utilities.\r\n\r\nUsage: snap \u003ccommand> [\u003coptions>...]\r\n\r\nCommands can be classified as follows:\r\n\r\n Basics: find, info, install, list, remove\r\n ...more: refresh, revert, switch, disable, enable\r\n History: changes, tasks, abort, watch\r\n Daemons: services, start, stop, restart, logs\r\n Commands: alias, aliases, unalias, prefer\r\n Configuration: get, set, wait\r\n Account: login, logout, whoami\r\n Permissions: connections, interface, connect, disconnect\r\n Snapshots: saved, save, check-snapshot, restore, forget\r\n Other: version, warnings, okay, ack, known\r\n Development: run, pack, try, download, prepare-image\r\n\r\nFor more information about a command, run 'snap help \u003ccommand>'.\r\ndebug1: client_input_channel_req: channel 0 rtype exit-status reply 0\r\ndebug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0\r\nFor a short summary of all commands, run 'snap help --all'.\r\ndebug1: channel 0: free: client-session, nchannels 1\r\nConnection to laptop closed.\r\nTransferred: sent 3060, received 4584 bytes, in 0.2 seconds\r\nBytes per second: sent 14002.7, received 20976.6\r\ndebug1: Exit status 0\r\n/home/jon>\r\n```\r\n\r\n","author":{"url":"https://github.com/jonstelly","@type":"Person","name":"jonstelly"},"datePublished":"2019-06-06T15:35:01Z","url":"https://github.com/PowerShell/PowerShell/issues/9842"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:b25fd977-d7cb-f6a0-4b11-62a7c9a63f58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A35C:3A9AD3:84FAD2:B722DA:6AFDF2F4 |
| html-safe-nonce | 682f9dce0fc0ccff9da2db1d994bb580cb6e30389169d21b12ad11c423a56dc8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzVDOjNBOUFEMzo4NEZBRDI6QjcyMkRBOjZBRkRGMkY0IiwidmlzaXRvcl9pZCI6IjgzOTAyMjA1MjA0NzE4ODcyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ee12f1caaa803e646fc90765edb7e1c28e410e7128eee71bc6ec583477270da7 |
| hovercard-subject-tag | issue:453100677 |
| 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/9842/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f21d0d4f99f367f9bf504e61a82a21d7ebba39f9ecaf01ad552c5dc07216d06f/PowerShell/PowerShell/issues/9842 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f21d0d4f99f367f9bf504e61a82a21d7ebba39f9ecaf01ad552c5dc07216d06f/PowerShell/PowerShell/issues/9842 |
| og:image:alt | I'm not sure if this is a snap-specific issue, but if so, I see discussion here about only providing powershell core for non-lts systems as a snap: #7310 Steps to reproduce Configure /snap/bin/pwsh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jonstelly |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd812ec581ecac95855f5ec917ef9827506c39a9da1443f43ddb4179a46471eb |
| 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 | 32ac708bac264dafdc28e10ff49b4d137f0c34a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width