Skip to content

Remote-SSH connection fails when the generated VS Code host alias is long (“ControlPath too long”) #629

Description

@lennmail

The VS Code host alias generated for Coder workspaces can be very long. This pushes OpenSSH’s ControlPath over its 108-byte limit, and the connection fails with:

ControlPath too long ('/home/<user>/.ssh/master-<user>@<generated-alias>:22' >= 108 bytes)
ssh child died, shutting down

Activity

  1. davo-canva commented on Dec 15, 2025

    @davo-canva
    Contributor

    you probably want to use %C rather than %r@%h:%p or similar combination in your ControlPath

  2. lennmail commented on Dec 15, 2025

    @lennmail
    Author

    yes, that works, i think one might want to make this the default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions