Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Scanning remote target on MacOS fails with ssh-error: "path ... too long for Unix domain socket" #254

Open
Benno-K opened this issue Mar 23, 2020 · 2 comments

Comments

@Benno-K
Copy link

Benno-K commented Mar 23, 2020

On MacOS ssh's ControlPath gets too long, so you get an error similar to:

Can't connect to remote machine! Exception was: There was a problem with SshConnection! 
Failed to create SSH master socket! 
Diagnostic info: Starting process '/usr/bin/ssh -M -f -N -o ServerAliveInterval=60 -o ControlPath=/private/var/folders/n_/234pymm5149_ycvvl26572yc0000gn/T/scap-workbench-NDlAEr/ssh_socket user@somehost' 
stdout: =============================== 
stderr: =============================== 
unix_listener: path "/private/var/folders/n_/234pymm5149_ycvvl26572yc0000gn/T/scap-workbench-NDlAEr/ssh_socket.9JRdXUmnDlfRr63y" too long for Unix domain socket 

When an error like this happens outside scap-workbench, it can be easily remedied by creating a ~/.ssh/ssh_config with content like

Host *
  ControlPath ~/.ssh/control-%C
  ControlMaster auto

But the scap-workbench seems to ignore settings in that file and to "hard-code" the socket with a much too long path.
Remark: the length is limited to 184 characters including the trailing 0

@evgenyz evgenyz added this to the 1.2.2 milestone Mar 23, 2020
@2b
Copy link

2b commented Mar 23, 2020

Workaround - change $TMPDIR variable to something shorter. It's not necessary to change it globally, just change it for current shell session:

TMPDIR=/tmp; open /Applications/scap-workbench.app

@Benno-K
Copy link
Author

Benno-K commented Mar 24, 2020

Thank you 2b!
The suggested workaround indeed makes it work.
Helps a lot.

Sometimes you just don't think about the obvious.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants