Answer the question
In order to leave comments, you need to log in
How to detach ssh from terminal without killing port forwarding?
There is a server that you need to work with via VNC, which looks at localhost.
To connect, I first forward port 5901 via ssh. ssh [email protected] -L 5901:localhost:5901
You need to work as root (yes!), but before that, log in as user, and only then do su -
.
The result is something like:
The bottom line is that ssh remains attached to the terminal, but I do not need it.
How to decide? ssh [email protected] -L 5901:localhost:5901 -t 'su -'
Answer the question
In order to leave comments, you need to log in
-f
separate ssh session with the parameter (after reading in the manual how it works) to forward the portDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question