Skip to content
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

ControlPath too long ('[...]@uptermd.upterm.dev:22' >= 104 bytes) #283

Closed
laverdet opened this issue Aug 23, 2024 · 2 comments
Closed

ControlPath too long ('[...]@uptermd.upterm.dev:22' >= 104 bytes) #283

laverdet opened this issue Aug 23, 2024 · 2 comments

Comments

@laverdet
Copy link

Hello, this isn't a bug report I just want to document this in case anyone runs into it again. I got this error while trying to use upterm and Google wasn't any help.

ControlPath too long ('[...]@uptermd.upterm.dev:22' >= 104 bytes)

I got the error on multiple machines I own so I was pretty confused. It turns out that like 14 years ago I added this to my .ssh/config file and synced it across my devices:

Host *
  ControlPath ~/.ssh/%l-%r@%h:%p

This directive shares one ssh connection between multiple invocations to ssh to the same host. It's actually pretty nice if you're doing a lot of invocations to scp in multiple terminals. Anyway turns out that there's a maximum length on that control path. Uh so if you get this error message that's what's going on.

@xlambein
Copy link

I'm having the same issue, which is a bit annoying because I'd like to keep my ControlPath option in my .ssh/config. I'm annoyed that there's this restriction on OpenSSH, but I'm also curious to know why the upterm usernames are so long 😅

@xlambein
Copy link

xlambein commented Nov 29, 2024

Well, for now I found a fix to my issue. Instead of using %r in the ControlPath, you can use %C, which is a hash of several values including %r, and it's much shorter.

For example, I use ControlPath ~/.ssh/master-%C@%n:%p.

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

No branches or pull requests

2 participants