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

Re: Bug#87253: wish: ssh tunneling to UNIX sockets



tyler@yi.org said:
>  I would like to see ssh support tunneling to/from UNIX sockets as
> well as TCP/IP sockets. I imagine something like this:
>
>  ssh -L 3306:/var/lib/mysql.sock -N -f faraway@yi.org

While having it integrated into ssh might be nice, I don't think that's
the right place for it. You can do what you want to do (and a lot more)
by combining ssh and socat. For instance, the above would be:

socat TCP-LISTEN:3306 EXEC:'ssh faraway@yi.org socat STDIO UNIX-CONNECT:/var/lib/mysql/mysql.sock'

or something similar. True, you need socat present on both ends. But in
the long run, even if ssh supports unix sockets, I don't think it'll
ever reach the level of generality of a tool like socat.

Jason



Reply to: