I'd like to be able to remotely listen to UNIX sockets in order to make programs such as dtach, which only support listening to UNIX sockets, work remotely. I've read about socat and how it's able to forward UNIX sockets to TCP sockets and vice-versa, but in practice I haven't been able to make this work. So, through socat or any other means, how can one remotely listen to UNIX sockets?

(If you happen to know how to make dtach work remotely, then that's fine too. This question is simply an abstract question to the actual problem.)

link|improve this question

feedback

1 Answer

I just found that this works:

remotehost$ socat TCP-LISTEN:6066 UNIX-CONNECT:/tmp/a.socket
localhost$ socat UNIX-LISTEN:/tmp/a.socket TCP:remotehost:6066
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.