[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



Your message dated Wed, 8 Feb 2023 10:34:07 +0000
with message-id <Y+N6n/u88Fle62KQ@riva.ucam.org>
and subject line Re: Bug#1021122: ssh: Please increase unix_listener socket path limit (path ... too long for Unix domain socket)
has caused the Debian Bug report #1021122,
regarding ssh: Please increase unix_listener socket path limit (path ... too long for Unix domain socket)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1021122: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021122
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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/user@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

--- End Message ---
--- Begin Message ---
On Sun, Oct 02, 2022 at 05:00:21PM +0200, Petter Reinholdtsen wrote:
> 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/user@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?

Sorry, this is a Linux API limitation and not something that OpenSSH can
change.  See unix(7).

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.

-- 
Colin Watson (he/him)                              [cjwatson@debian.org]

--- End Message ---

Reply to: