News for hackers. Stuff that matters.
Re:Can You Grok It – Hacking Together Your Own Dev Tunnel Se... by 0xdade on Monday April 15, 2024 @12:12AM (#40037012)
Ohh so I just gave this a shot and I think that the trap runs when `.ssh/rc` exits, which is immediately when my bash prompt shows up. But if I want to make it non-interactive (in a really hacky way) then I can have my .ssh/rc file just infinitely sleep if domain is defined. Then I killed the ssh connection via a `kill` command on the client side and it appropriately cleaned up the socket file in tmp.

I combined this infinite loop in ssh rc and a -T and a simple command "echo hello" in my client function and now it prints out the link to visit, hangs infinitely until I close it or it gets closed, and cleans itself up.

This just took the level of hackishness to new heights and I love it.

Re:Can You Grok It – Hacking Together Your Own Dev Tunnel Se... by cbluth on Monday April 15, 2024 @01:03AM (#40037220)
Using a trap didn't work?