Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .