Skip to content

feat: modify config-ssh to set the host suffix - #17280

Merged
spikecurtis merged 3 commits into
mainfrom
spike/host-suffix/config-ssh-uses-host-suffix
Apr 8, 2025
Merged

spikecurtis merged 3 commits into
mainfrom
spike/host-suffix/config-ssh-uses-host-suffix

Conversation

@spikecurtis

@spikecurtis spikecurtis commented Apr 7, 2025 •

Copy link
Copy Markdown
Contributor

Wires up config-ssh command to use a hostname suffix if configured.

part of: #16828

e.g. coder config-ssh --hostname-suffix spiketest gives:

# ------------START-CODER-----------
# This section is managed by coder. DO NOT EDIT.
#
# You should not hand-edit this section unless you are removing it, all
# changes will be lost when running "coder config-ssh".
#
# Last config-ssh options:
# :hostname-suffix=spiketest
#
Host coder.* *.spiketest
        ConnectTimeout=0
        StrictHostKeyChecking=no
        UserKnownHostsFile=/dev/null
        LogLevel ERROR
        ProxyCommand /home/coder/repos/coder/build/coder_config_ssh --global-config /home/coder/.config/coderv2 ssh --stdio --ssh-host-prefix coder. --hostname-suffix spiketest %h
# ------------END-CODER------------

spikecurtis commented Apr 7, 2025 •

Copy link
Copy Markdown
Contributor Author

@spikecurtis
spikecurtis marked this pull request as ready for review April 7, 2025 13:18

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nit but otherwise LGTM 👍🏻

Comment thread cli/configssh_test.go Outdated

@johnstcn johnstcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have one clarification regarding having both prefix and suffix enabled and expected behaviour / testing. Does it make sense to have both of these enabled?

Comment thread cli/configssh.go Outdated
@spikecurtis
spikecurtis removed the request for review from bcpeinhardt April 7, 2025 17:17
@spikecurtis
spikecurtis force-pushed the spike/host-suffix/ssh-hostname-suffix-flag branch from 34de3bc to c45e4db Compare April 7, 2025 17:18
@spikecurtis
spikecurtis force-pushed the spike/host-suffix/config-ssh-uses-host-suffix branch from 2cac087 to 237f8e4 Compare April 7, 2025 17:18
@spikecurtis
spikecurtis changed the base branch from spike/host-suffix/ssh-hostname-suffix-flag to graphite-base/17280 April 7, 2025 17:33
@spikecurtis
spikecurtis force-pushed the spike/host-suffix/config-ssh-uses-host-suffix branch from 237f8e4 to 0ae03f3 Compare April 7, 2025 17:33
@spikecurtis
spikecurtis force-pushed the graphite-base/17280 branch from c45e4db to d312e82 Compare April 7, 2025 17:33
@graphite-app
graphite-app Bot changed the base branch from graphite-base/17280 to main April 7, 2025 17:34
@spikecurtis
spikecurtis force-pushed the spike/host-suffix/config-ssh-uses-host-suffix branch from 0ae03f3 to 283830c Compare April 7, 2025 17:34
@spikecurtis
spikecurtis force-pushed the spike/host-suffix/config-ssh-uses-host-suffix branch from 283830c to b78738c Compare April 8, 2025 07:38
@spikecurtis
spikecurtis merged commit 9eeb506 into main Apr 8, 2025

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Apr 8, 3:48 AM EDT: A user merged this pull request with Graphite.

@spikecurtis
spikecurtis deleted the spike/host-suffix/config-ssh-uses-host-suffix branch April 8, 2025 07:48
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 8, 2025
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.

4 participants