Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use motd for all output incoder ssh [--stdio] commands #4927

Closed as not planned
@mafredri

Description

@mafredri

We have multiple scenarios in which we print output during SSH commands (bothssh coder... andcoder ssh ...):

This is not ideal since we must not get in the way of using SSH normally. Things like:

out=$(ssh coder.workspace ls)err=$(ssh coder.workspace ls2>&11>/dev/null)

should work without dirtying the output.

The ideal way to do this would be to utilizemotd 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.

Ultimately we may want to have both methods, reserving the non-motd output for critical messages.

At minimum, we should comb over how we are printing these messages and ensure they’re hidden in non-tty cases.

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.


I think printing to stderr is a good first step, but in the future I think it would be a good idea to start usingBannerCallback instead.

At least on systems with/etc/motd and OpenSSH, messages don't appear in non-interactive modes likessh host ls. I believe this should (automatically) be the case when usingBannerCallback too.

But to do that, we'd also need to fix all other occurrences of printing to stdout in thecoder ssh [--stdio] command.

Originally posted by@mafredri in#4926 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp