Skip to content

coder config-ssh when coder is installed sandboxed via snap is writing to wrong location #13965

Open
@matifali

Description

@matifali

Context

When Coder is installed as a snap package, coder config-ssh does not respect the default value of
--ssh-config-file which is ~/.ssh/config and instead writes config to ~/snap/coder/xX/.ssh/config.

See the console output.

coder config-ssh
WARN: The current executable path does not match the executable path found in $PATH.
  | This may cause issues connecting to your workspace via SSH.
  |     Current executable path: "/snap/coder/x3/coder"
  |     Executable path in $PATH: ""

> The following changes will be made to your SSH configuration:

    * Update the coder section in /home/atif/snap/coder/x3/.ssh/config

  Continue? (yes/no) yes

Updated "/home/atif/snap/coder/x3/.ssh/config"
You should now be able to ssh into your workspace.
For example, try running:

        $ ssh coder.coder

Problem

This causes ssh coder.coder to not work as there are no entries in ~/.ssh/config. coder ssh coder works fine.

Workaround

A workaround is to run coder config-ssh --ssh-config-file ~/.ssh/config which allows both coder ssh coder and ssh coder.coder to work.

Suggestion

coder config-ssh should use the correct default for --ssh-config-file argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliArea: CLI

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions