Title: don't override User in ssh_config · Issue #11344 · PowerShell/PowerShell · GitHub
Open Graph Title: don't override User in ssh_config · Issue #11344 · PowerShell/PowerShell
X Title: don't override User in ssh_config · Issue #11344 · PowerShell/PowerShell
Description: request: don't override User directive in ssh_config I pre-generate ssh host keys which I deploy to cloud instances using cloud-init for use by their ssh daemons. This allows me to generate local ssh client configuration files: a known_h...
Open Graph Description: request: don't override User directive in ssh_config I pre-generate ssh host keys which I deploy to cloud instances using cloud-init for use by their ssh daemons. This allows me to generate local s...
X Description: request: don't override User directive in ssh_config I pre-generate ssh host keys which I deploy to cloud instances using cloud-init for use by their ssh daemons. This allows me to generate loc...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11344
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"don't override User in ssh_config","articleBody":"### request: don't override `User` directive in ssh_config\r\n\r\nI pre-generate ssh host keys which I deploy to cloud instances using cloud-init for use by their ssh daemons. This allows me to generate local ssh client configuration files:\r\n\r\n- a `known_hosts` file containing, for each instance, the instance's public key; and\r\n- an `ssh_config` file containing, for each instance, a `UserKnownHostsFile` directive pointing to the `known_hosts` file, a `User` directive providing the instance's system administrator username (e.g.: \"ec2-user\" for AWS RedHat instances, \"sysadmin\" for AWS Debian instances, \"Administrator\" for Windows Server instances, etc.), and a `ProxyJump` directive so that connections to the instances are routed through a bastion host.\r\n\r\nThis allows me to avoid security warnings regarding unknown host keys, etc. and to use ansible without compromising the ssh security model.\r\n\r\nPowerShell Core Remoting over SSH uses the underlying operating system's ssh client. In the case of OpenSSH on Linux or macOS, this means that the `ssh_config` and `known_hosts` files that I generated provide the directives necessary for a secure connection as described above.\r\n\r\nThis works perfectly _except_ that StartSSHProcess always passes a `User` command line parameter to the ssh client, overriding the `User` directive in `ssh_config`.\r\n\r\nAs a system administrator, I want to generate ssh configuration files containing directives that aren't overriden by PowerShell's invocation of ssh.\r\n\r\n### proposal: do not pass `-l \u003cusername>` to ssh client unless `-UserName \u003cusername>` is passed to cmdlets\r\n\r\nWhen invoking *PSSession cmdlets, if `-UserName \u003cusername>` isn't used , then don't pass `-l \u003cusername>` as a command line argument to the ssh client.\r\n","author":{"url":"https://github.com/LucaFilipozzi","@type":"Person","name":"LucaFilipozzi"},"datePublished":"2019-12-15T05:18:13Z","url":"https://github.com/PowerShell/PowerShell/issues/11344"}
| 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:2fcaca48-bc54-d154-7e6e-1547d34503b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FFC:1BA848:11CC35:18177F:6AFD4C8C |
| html-safe-nonce | 36474c57b0b78770b7f4edea1736512d61abf86f61b3c28084252fe4e018e06e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkZDOjFCQTg0ODoxMUNDMzU6MTgxNzdGOjZBRkQ0QzhDIiwidmlzaXRvcl9pZCI6IjE3NTQzMTI4OTAyOTYxMjY2MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 401ff02ff1cbe55c6958016d242710f5ad34e5681392fb98179721b118db6a2d |
| hovercard-subject-tag | issue:538005335 |
| 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/11344/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d7821016cbea909b14f8a6b04d57a3529967340b29795d666d51e69946af1e47/PowerShell/PowerShell/issues/11344 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d7821016cbea909b14f8a6b04d57a3529967340b29795d666d51e69946af1e47/PowerShell/PowerShell/issues/11344 |
| og:image:alt | request: don't override User directive in ssh_config I pre-generate ssh host keys which I deploy to cloud instances using cloud-init for use by their ssh daemons. This allows me to generate local s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LucaFilipozzi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width