Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add support for MOTD file in coder agents #5147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Nov 24, 2022
Merged

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Nov 22, 2022

This PR adds support for showing MOTD (message of the day) in coder agents when the user logs in via SSH.

It follows closely to the implementation in OpenSSH, a ~/.hushlogin file disables the message, as does non-login sessions (e.g. ssh coder.test echo hi).

It relies on coder/terraform-provider-coder#78 which landed in v0.6.4 of the terraform provider.

In the future, this functionality could perhaps be expanded so that e.g. vscode or jetbrains extensions can show motd or motd-like messages as well.

  • feat: Add plumbing for motd file
  • feat: Print motd on SSH login sessions
  • chore: Unify homedir lookup in agent
  • chore: Add terraform test for motd_file

image

@mafredri mafredri self-assigned this Nov 22, 2022
@mafredri mafredri marked this pull request as ready for review November 23, 2022 09:53
@mafredri mafredri requested a review from a team November 23, 2022 09:55
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code logic LGTM. I left a few comments related to syntax.

@mafredri mafredri enabled auto-merge (squash) November 24, 2022 12:17
@mafredri mafredri merged commit eff99f7 into main Nov 24, 2022
@mafredri mafredri deleted the mafredri/feat-motd branch November 24, 2022 12:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants