Re: Reverse ssh tunnel bound to remote socket reserves the socket address after disconnect preventing reconnecting

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

 



Hi Timo,

I suspect that the reason the socket is not removed from the UNIX filesystem is because Linux (I assume) doesn't remove it when the socket is closed.  SSH probably does the same thing to create and to destroy UNIX-domain sockets as it does for IP sockets, namely, create using socket()+bind(), destroy using close().  Personally, I think it's wrong that the close() call doesn't remove the name, but that's something which is unlikely to change.

You are right, SSH could remove the name, however, as it doesn't (although perhaps that might change), you could work around the problem by removing it yourself, e.g.

sh -c 'ssh -N -T -R $(pwd)/lol.socket:127.0.0.1:4444 127.0.0.1; rm lol.socket' &

Regards.

David

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux