Has somebody here figured out how to keep code tunnel
running after I close the terminal?
I typically log in to my terminal via SSH, but would like to keep the tunnel intact so that I can just always comfortably access VSCode in the browser whenever I'm connected to the internal network via VPN. Any tips? Disown did not work for me, nor did starting up a tmux container, and running code tunnel
inside.
To clarify, I use fish
shell. First, I started the tunnel using code tunnel > ct_out 2> tc_err &
, then I used ps -u
to find the PID of the process, which I disowned using disown PID
.
I found the solution in user's comment, in the fish documentation:
https://fishshell.com/docs/current/cmds/disown.html
I ran code tunnel > ct_out 2> tc_err &; disown
in one line, and it's been running stably since.