Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.)

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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