Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1021122: ssh: Please increase unix_listener socket path limit (path ... too long for Unix domain socket)

413 views
Skip to first unread message

Petter Reinholdtsen

unread,
Oct 2, 2022, 11:10:04 AM10/2/22
to

Package: openssh-client
Version: 1:8.4p1-5

When using ssh with torsocks to log into a machine with ssh available
via Tor, and ~/.ssh/config set up to use a control socket, I get this
error when I try to log in (note, the onion address has been replaced
with a different one without SSH available, as I do not want to share
the name of my internal servers and picked one of the Debian APT source
addresses as a replacement):

unix_listener: path
"/home/user/.ssh/sock/us...@2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion:22.XRUZqmyfV6BqfB0H"
too long for Unix domain socket

My ~/.ssh/config have setup like this:

Host *
ControlPath ~/.ssh/sock/%r@%h:%p
ControlMaster auto

I log in using a commend like this:

torsocks ssh 2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion

According to
<URL: https://stackoverflow.com/questions/35970686/ansible-ssh-error-unix-listener-too-long-for-unix-domain-socket >
there is a 104 or 108 character count limit on the socket path length.
The path aboev is 109 characters.

Can this limit please be raised to a higher number, perhaps 256, to
ensure such union address can be used as hostnames?

A workaround is to use '-S none' to disable the control socket, but it
is quite a a blunt hammer, and I thought it might be worth a try to ask
if you could raise the size limit instead.

--
Happy hacking
Petter Reinholdtsen

Petter Reinholdtsen

unread,
Feb 6, 2023, 1:50:04 AM2/6/23
to

Dear maintainer,

Is there any hope to have the size limited increased a bit in time for
the Bookworm release?

Petter Reinholdtsen

unread,
Feb 8, 2023, 8:30:04 AM2/8/23
to
[Colin Watson]
> Sorry, this is a Linux API limitation and not something that OpenSSH
> can change. See unix(7).

Aha. Sad to hear. Hoped it was simpler to extend than rewriting
Linux. :)

> Given what you've posted, you could probably work around it by
> shortening the path prefix in ControlPath. Not pretty, but it would
> let you use onion addresses here.

Ah, of course. I changed to use "ControlPath ~/.ssh/sock/%C" instead,
and it seem to work better.
0 new messages