Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add config-ssh command #17

Merged
merged 6 commits into from
May 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use coder.<env> to prevent collision with sftp
  • Loading branch information
cmoog committed May 26, 2020
commit 02c209a44fe8ce2b0389a91b2fe2d5dbdea2eb94
4 changes: 2 additions & 2 deletions cmd/coder/config_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (cmd *configSSHCmd) Run(fl *pflag.FlagSet) {
fmt.Printf("An auto-generated ssh config was written to %q\n", cmd.filepath)
fmt.Printf("Your private ssh key was written to %q\n", cmd.privateKeyFilepath)
fmt.Println("You should now be able to ssh into your environment")
fmt.Printf("For example, try running\n\n\t$ ssh coder:%s\n\n", envs[0].Name)
fmt.Printf("For example, try running\n\n\t$ ssh coder.%s\n\n", envs[0].Name)
}

func (cmd *configSSHCmd) writeSSHKey(ctx context.Context, client *entclient.Client) error {
Expand All @@ -133,7 +133,7 @@ func (cmd *configSSHCmd) makeNewConfigs(userName string, envs []entclient.Enviro

func (cmd *configSSHCmd) makeConfig(userName, envName string) string {
return fmt.Sprintf(
`Host coder:%s
`Host coder.%s
HostName %s
User %s-%s
StrictHostKeyChecking no
Expand Down