René's URL Explorer Experiment


Title: Use motd for all output in `coder ssh [--stdio]` commands · Issue #4927 · coder/coder · GitHub

Open Graph Title: Use motd for all output in `coder ssh [--stdio]` commands · Issue #4927 · coder/coder

X Title: Use motd for all output in `coder ssh [--stdio]` commands · Issue #4927 · coder/coder

Description: We have multiple scenarios in which we print output during SSH commands (both ssh coder... and coder ssh ...): CLI/server version mismatch (currently prints to stderr even when non-tty) License issues (currently prints to stderr even whe...

Open Graph Description: We have multiple scenarios in which we print output during SSH commands (both ssh coder... and coder ssh ...): CLI/server version mismatch (currently prints to stderr even when non-tty) License iss...

X Description: We have multiple scenarios in which we print output during SSH commands (both ssh coder... and coder ssh ...): CLI/server version mismatch (currently prints to stderr even when non-tty) License iss...

Opengraph URL: https://github.com/coder/coder/issues/4927

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use motd for all output in `coder ssh [--stdio]` commands ","articleBody":"We have multiple scenarios in which we print output during SSH commands (both `ssh coder...` and `coder ssh ...`):\r\n\r\n- CLI/server version mismatch (currently prints to stderr even when non-tty)\r\n- License issues (currently prints to stderr even when non-tty)\r\n- Workspace out of date (#4926)\r\n\r\nThis is not ideal since we must not get in the way of using SSH normally. Things like:\r\n\r\n```sh\r\nout=$(ssh coder.workspace ls)\r\nerr=$(ssh coder.workspace ls 2>&1 1>/dev/null)\r\n```\r\n\r\nshould work without dirtying the output.\r\n\r\nThe ideal way to do this would be to utilize [motd](https://github.com/openssh/openssh-portable/blob/25bd659cc72268f2858c5415740c442ee950049f/session.c#L784) for all SSH messaging. This would, however, mean that messages are delayed until connection is established. Which would be problematic if we want to inform the users that the cli version is mismatched and we can't establish a connection because of it.\r\n\r\nUltimately we may want to have both methods, reserving the non-motd output for critical messages.\r\n\r\nAt minimum, we should comb over how we are printing these messages and ensure they’re hidden in non-tty cases.\r\n\r\n_Edit: This issue was originally created with the incorrect assumption that banner translates to motd, banner is in fact the message shown before authentication, motd is shown just before the login shell._\r\n\r\n---\r\n\r\n~~I think printing to stderr is a good first step, but in the future I think it would be a good idea to start using [`BannerCallback`](https://pkg.go.dev/golang.org/x/crypto/ssh#BannerCallback) instead.~~\r\n\r\n~~At least on systems with `/etc/motd` and OpenSSH, messages don't appear in non-interactive modes like `ssh host ls`. I believe this should (automatically) be the case when using `BannerCallback` too.~~\r\n\r\n~~But to do that, we'd also need to fix all other occurrences of printing to stdout in the `coder ssh [--stdio]` command.~~\r\n\r\n_Originally posted by @mafredri in https://github.com/coder/coder/pull/4926#pullrequestreview-1170249191_\r\n      ","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2022-11-07T13:13:37Z","url":"https://github.com/coder/coder/issues/4927"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0c232cc6-e56a-97da-59e7-e9fd9033e501
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA016:215B92:23EF728:2FD53EF:6B019759
html-safe-nonce0b7b8710e89a2ac51cd4696ee21393f2038d0ad2d032688f59d039714fe09feb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDE2OjIxNUI5MjoyM0VGNzI4OjJGRDUzRUY6NkIwMTk3NTkiLCJ2aXNpdG9yX2lkIjoiMzI5MjM4NTQ5MjY4Mjc3NDM2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdac8eb1cbb2350b28978cc14fdbf0f2a9b7dac4b58e5ff5c1416f8bfa5c4f7cd
hovercard-subject-tagissue:1438348706
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/4927/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8fd9944f3117d7fc124798365133f397edabdeb6e6bd199edce6cc860a98236c/coder/coder/issues/4927
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8fd9944f3117d7fc124798365133f397edabdeb6e6bd199edce6cc860a98236c/coder/coder/issues/4927
og:image:altWe have multiple scenarios in which we print output during SSH commands (both ssh coder... and coder ssh ...): CLI/server version mismatch (currently prints to stderr even when non-tty) License iss...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemafredri
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/4927#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F4927
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F4927
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/4927
Reloadhttps://github.com/coder/coder/issues/4927
Reloadhttps://github.com/coder/coder/issues/4927
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/4927
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/4927
Use motd for all output in coder ssh [--stdio] commands https://github.com/coder/coder/issues/4927#top
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Nov 7, 2022https://github.com/coder/coder/issues/4927#issue-1438348706
feat: show banner when workspace is outdated #4926https://github.com/coder/coder/pull/4926
motdhttps://github.com/openssh/openssh-portable/blob/25bd659cc72268f2858c5415740c442ee950049f/session.c#L784
BannerCallbackhttps://pkg.go.dev/golang.org/x/crypto/ssh#BannerCallback
@mafredrihttps://github.com/mafredri
#4926 (review)https://github.com/coder/coder/pull/4926#pullrequestreview-1170249191
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Nov 7, 2022https://github.com/coder/coder/issues/4927#issuecomment-1306292283
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Nov 8, 2022https://github.com/coder/coder/issues/4927#issuecomment-1307003885
@bpmcthttps://github.com/bpmct
@mtojekhttps://github.com/mtojek
found outhttps://github.com/coder/coder/pull/4926#issuecomment-1305930792
#3597https://github.com/coder/coder/issues/3597
mafredrihttps://github.com/mafredri
on Nov 16, 2022https://github.com/coder/coder/issues/4927#event-7821976372
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jan 16, 2023https://github.com/coder/coder/issues/4927#issuecomment-1383294588
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 16, 2023https://github.com/coder/coder/issues/4927#event-8230768796
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jan 23, 2023https://github.com/coder/coder/issues/4927#event-8329865964
kylecarbshttps://github.com/kylecarbs
on Jan 23, 2023https://github.com/coder/coder/issues/4927#event-8334403434
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 24, 2023https://github.com/coder/coder/issues/4927#event-8339344623
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 24, 2023https://github.com/coder/coder/issues/4927#issuecomment-1519204204
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Apr 24, 2023https://github.com/coder/coder/issues/4927#event-9075780714
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on May 1, 2023https://github.com/coder/coder/issues/4927#event-9133328947
mafredrihttps://github.com/mafredri
on Dec 16, 2023https://github.com/coder/coder/issues/4927#event-11266418627
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Dec 16, 2023https://github.com/coder/coder/issues/4927#issuecomment-1858901574
github-actionshttps://github.com/apps/github-actions
staleThis issue is like stale bread.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22stale%22
on Dec 17, 2023https://github.com/coder/coder/issues/4927#event-11266878461
https://github.com/sreya
sreyahttps://github.com/sreya
on Apr 4, 2024https://github.com/coder/coder/issues/4927#issuecomment-2037890586
sreyahttps://github.com/sreya
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Apr 4, 2024https://github.com/coder/coder/issues/4927#event-12362839018
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/4927
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/4927
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.