Skip to content

SSH config should not suggest or use .dev TLDs #3143

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

Closed
kotx opened this issue Jul 23, 2022 · 2 comments · Fixed by #3150
Closed

SSH config should not suggest or use .dev TLDs #3143

kotx opened this issue Jul 23, 2022 · 2 comments · Fixed by #3150
Assignees

Comments

@kotx
Copy link

kotx commented Jul 23, 2022

The .dev TLD is not reserved, and having coder config-ssh override coder.workspace-name.dev can conflict with real domains.
For example if my coder instance was hosted on coder.aaaa.dev, and I had a workspace called aaaa, I can no longer SSH to the server that hosts the Coder instance.
The frontend and coder ssh-config should therefore not use .dev after the workspace name.

@ammario ammario added the bug label Jul 23, 2022
@ammario
Copy link
Member

ammario commented Jul 23, 2022

The suffix is the name of the agent. All of our example templates use dev as the agent name, for example:

resource "coder_agent" "dev" {
arch = var.step2_arch
os = "linux"
startup_script = <<EOF
#!/bin/sh
# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh
code-server --auth none --port 13337
EOF
# These environment variables allow you to make Git commits right away after creating a
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
# You can remove this block if you'd prefer to configure Git manually or using
# dotfiles. (see docs/dotfiles.md)
env = {
GIT_AUTHOR_NAME = "${data.coder_workspace.me.owner}"
GIT_COMMITTER_NAME = "${data.coder_workspace.me.owner}"
GIT_AUTHOR_EMAIL = "${data.coder_workspace.me.owner_email}"
GIT_COMMITTER_EMAIL = "${data.coder_workspace.me.owner_email}"
}
}

Perhaps dev isn't the best name for agents, but since conflicts would be rare and the workaround is a small edit to the template, I think we can close this issue.

@kotx
Copy link
Author

kotx commented Jul 23, 2022

Maybe we can rename the agent in the default templates instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants