Open a terminal or command prompt on your local machine.
Type the following command to SSH into the remote machine:
ssh username@machine-ip
. Replaceusername
with the actual username you use to log into the remote machine, andmachine-ip
with the actual IP address of the remote machine. You may be prompted for the password for the user account you're connecting with.Once you're logged in to the remote machine, type the following command to start the VNC server:
vncserver
. This will create a new virtual desktop session on the remote machine, which you can connect to using a VNC client.Note down the display number assigned to the VNC server. This will be a number preceded by a colon (e.g.,
:1
). You'll need this later when you connect to the VNC server using a VNC client.Type the following command to set a password for the VNC server:
vncpasswd
. This will prompt you to enter and verify a password for the VNC server. Make sure to remember this password, as you'll need it later to connect to the VNC server.
Info |
---|
Note: you may not need to use the |
Exit the SSH session by typing
exit
orlogout
.Download and install a VNC client on your local machine. A popular option is RealVNC, which you can download from their website: https://www.realvnc.com/en/connect/download/viewer/ .
Open the VNC client and enter the IP address of the remote machine, followed by the display number you noted down earlier (e.g.,
machine-ip:1
).Enter the password you set for the VNC server when prompted.
You should now be connected to the remote machine's virtual desktop session via VNC, which you can control using your local machine's keyboard and mouse.