Linux Remote Access
Introduction
How to remotely access a linux machine.
Create a Persistent VNC Session on Suse Linux Enterprise Server:
- Open a shell and make sure you are logged in as the user that should own the VNC session.
- If the network interface serving the VNC sessions is protected by a firewall, you need to manually open the port used by your session in the firewall. If starting multiple sessions you may alternatively open a range of ports.
vncserver uses the ports 5901 for display :1, 5902 for display :2, and so on. For persistent sessions, the VNC display and the X display usually have the same number. - To start a session with a resolution of 1024x769 pixel and with a color depth of 16-bit, enter the following command:
vncserver -geometry 1024x768 -depth 16
The vncserver command picks an unused display number when none is given and prints out its choice. See man 1 vncserver for more options.
When running vncviewer for the first time, it asks for a password for full access to the session. If needed, you can also provide a password for view-only access to the session.
The password(s) you are providing here are also used for future sessions started by the same user. They can be changed with the vncpasswd
command.
IMPORTANT: Security Considerations
Make sure to use strong passwords of significant length (eight or more characters). Do not share these passwords.
VNC connections are unencrypted, so people who can sniff the network(s) between the two machines can read the password when it gets transferred at the beginning of a session.
To terminate the session shut down the desktop environment that runs inside the VNC session from the VNC viewer as you would shut it down if it was a regular local X session.
If you prefer to manually terminate a session, open a shell on the VNC server and make sure you are logged in as the user that owns the VNC session you want to terminate. Run the following command to terminate the session that runs on display :1: vncserver -kill :1
Connecting to a Persistent VNC Session:
To connect to a persistent VNC session, a VNC viewer must be installed. The standard viewer on SUSE Linux products is vncviewer, provided by the package tightvnc. You may also view a VNC session using your Web browser and a Java applet.
To start your VNC viewer and connect to display :1 of the VNC server, use the command
vncviewer jupiter.example.com:1
Instead of the VNC display number you can also specify the port number with two colons:
vncviewer jupiter.example.com::5901
Alternatively use a Java-capable Web browser to view the VNC session by entering the following URL: http://jupiter.example.com:5801
Source
Copying/Pasting full or partial texts without adding anything original is frowned upon by the community. Repeated copy/paste posts could be considered spam. Spam is discouraged by the community, and may result in action from the cheetah bot.
More information and tips on sharing content.
If you believe this comment is in error, please contact us in #disputes on Discord
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://doc.opensuse.org/documentation/leap/archive/42.1/reference/html/book.opensuse.reference/cha.vnc.html