Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 13320  / 2 Years ago, sun, december 5, 2021, 11:52:25

I am working on a remote cluster via ssh with the -X option, because I need to visualize data and graphs, over a vpn protocol. Sometime due to the instability of the internet connection I lose my session. They told me I could use vnc in order to not lose my current session, so that if the internet connection drops I can reconnect and continue with my previously open session.



What I do is to log in the remote cluster 'remote.cluster' and type



 vncserver :1


then I open another terminal on my system and I type



 ssh -C -NL 5901:remote.cluster:5901 [email protected] &


Then I start vinagre on my system and I connect using ssh protocol. The problem is that I do not have x11 forwarding and I cannot open windows. If I try to connect using the vnc protocol with vinagre it doesn't connect, because I get something as connection timeout.



What should I do?


More From » ssh

 Answers
4

In case we connect to a remote X-Server via VNC we have the advantage that the graphical application will stay running even when the SSH connection to the remote is down. We can then reconnect to resume the graphical application. See also:





To speed up reconnection we may combine the connection to the remote with an SSH session by using vncviewer from tightvncviewer Install tightvncviewer with the option -via. By this we can run on the remote server:



vncserver:0  ## or any other display number e.g. :1


to establish a connection on the viewer via an SSH tunnel:



vncviewer -via user@remote localhost:0


Doing so will need considerably more bandwith because the whole desktop will have to be transmitted from the VNC server. Therefore it may not really be a good idea for low bandwith connections but it may give you a somewhat better experience on high bandwith but unstable connections as compared with X-forwarding.


[#34143] Monday, December 6, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rryble

Total Points: 489
Total Questions: 121
Total Answers: 119

Location: Marshall Islands
Member since Mon, May 31, 2021
3 Years ago
rryble questions
Thu, Jan 5, 23, 18:10, 1 Year ago
Wed, Aug 11, 21, 07:19, 3 Years ago
Fri, Jul 23, 21, 00:13, 3 Years ago
;