我正在尝试通过我(justin)有 ssh 访问权限的计算机(HOST)建立隧道,以便 rsyncd 可以与 BackupPC 建立安全连接。
以下是 ssh 命令(BackupPC 中的 DumpPreUserCmd):
/usr/bin/ssh -4 -M -S stradella-socket -fN -l justin -L 58874:stradella.local:873 HOST -p PORT -vvv
ssh 能够连接并进行身份验证,但尝试绑定到套接字时失败(可能是权限被拒绝)。以下是 BackupPC 日志,其中显示了详细的 ssh 调试:
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug1: Authentication succeeded (publickey).
2019-04-23 21:00:06 Output from DumpPreUserCmd: Authenticated to HOST ([XXX.XXX.XXX.XXX]:PORT).
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug1: Local connections to LOCALHOST:58874 forwarded to remote address stradella.local:873
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug3: channel_setup_fwd_listener_tcpip: type 2 wildcard 0 addr NULL
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug1: Local forwarding listening on 127.0.0.1 port 58874.
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug2: fd 4 setting O_NONBLOCK
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug3: fd 4 is O_NONBLOCK
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug1: channel 0: new [port listener]
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug1: setting up multiplex master socket
2019-04-23 21:00:06 Output from DumpPreUserCmd: debug3: muxserver_listen: temporary control path stradella-socket.ksAS6rhpPSFtRqxW
2019-04-23 21:00:06 Output from DumpPreUserCmd: bind: Permission denied
2019-04-23 21:00:06 Output from DumpPreUserCmd: unix_listener: cannot bind to path: stradella-socket.ksAS6rhpPSFtRqxW
答案1
在我的 vscode 中,我有一些待处理的 docker 容器指向同一个 ssh 目标。所以我停止了所有这些容器,现在一切正常了。