Vnc viewer
Next, we’ll set up the VNC server as a systemd service so we can start, stop, and restart it as needed, like any other service. Next let’s set up our VNC server as a service. This will disconnect your VNC session as well. Press CTRL+C in your terminal to stop the SSH tunnel and return to your prompt. You can access files in your home directory with the file manager or from the command line, as seen here: Once you are connected, you’ll see the default Xfce desktop.
VNC VIEWER PASSWORD
You’ll be prompted to authenticate using the password you set in Step 1.
![vnc viewer vnc viewer](https://mac-cdn.softpedia.com/screenshots/vnc-viewer_3.jpg)
Once the tunnel is running, use a VNC client to connect to localhost:5901. If you are using a graphical SSH client, like PuTTY, use your_server_ip as the connection IP, and set localhost:5901 as a new forwarded port in the program’s SSH tunnel settings. Remember to replace sammy and your_server_ip with the sudo non-root username and IP address of your server. The -l switch specifies the remote login name. The -C switch enables compression, while the -N switch tells ssh that we don’t want to execute a remote command. In this case we’re binding port 5901 of the remote connection to port 5901 on your local machine. The -L switch specifies the port bindings. You can do this via the terminal on Linux or macOS with the following command: We’ll use an SSH tunnel to connect securely to our server, and then tell our VNC client to use that tunnel rather than making a direct connection.Ĭreate an SSH connection on your local computer that securely forwards to the localhost connection for VNC. VNC itself doesn’t use secure protocols when connecting. Step 3 - Connecting the VNC Desktop Securely With the configuration in place, let’s connect to the server from our local machine. The output should look like this, although you’ll see a different PID: VNC can launch multiple instances on other display ports, like :2, :3, and so on.īecause we are going to be changing how the VNC server is configured, first stop the VNC server instance that is running on port 5901 with the following command: This port is called a display port, and is referred to by VNC as :1. When VNC is first set up, it launches a default server instance on port 5901. The startup script was created when you ran the vncserver in the previous step, but we’ll create our own to launch the Xfce desktop. These commands are located in a configuration file called xstartup in the. Specifically, VNC needs to know which graphical desktop it should connect to. The VNC server needs to know which commands to execute when it starts up. Log file is /home/ sammy/.vnc/ your_hostname:1.log Starting applications specified in /home/ sammy/.vnc/xstartup Xauth: file /home/ sammy/.Xauthority does not existĬreating default startup script /home/ sammy/.vnc/xstartup OutputWould you like to enter a view-only password (y/n)? n You’ll be prompted to enter and verify a password to access your machine remotely:
![vnc viewer vnc viewer](https://lh4.googleusercontent.com/-pSteoBeizYM/UXJQTcpwbtI/AAAAAAABDYA/X2Uh20Z0jvw/s800/vnc-viewer.png)
To complete the VNC server’s initial configuration after installation, use the vncserver command to set up a secure password and create the initial configuration files:
VNC VIEWER INSTALL
Once that installation completes, install the TightVNC server: Now install the Xfce desktop environment on your server:
VNC VIEWER UPDATE
On your server, update your list of packages: Specifically, we will install packages for the latest Xfce desktop environment and the TightVNC package available in the official Ubuntu repository.
![vnc viewer vnc viewer](https://i.ytimg.com/vi/PiMqOFB9Qp8/hqdefault.jpg)
Step 1 - Installing the Desktop Environment and VNC Serverīy default, an Ubuntu 18.04 server does not come with a graphical desktop environment or a VNC server installed, so we’ll begin by installing those.