Sunday, May 26, 2019

Install VNC on Ubuntu 18.04 for RDP from Windows

Install Xfce on your server:


sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
 
 sudo apt install tigervnc-standalone-server tigervnc-common
  
Next setup a password for vnc login:
 $ vncpasswd
 $ ls -l ~/.vnc/
 
sudo nano /etc/systemd/system/vncserver@.service


/etc/systemd/system/vncserver@.service
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=simple User=linuxize PAMName=login PIDFile=/home/%u/.vnc/%H%i.pid ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :' ExecStart=/usr/bin/vncserver :%i -geometry 1440x900 -alwaysshared -fg ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target

 VNC is not an encrypted protocol and can be subject to packet sniffing. The recommended approach is to create an SSH tunnel that will securely forwards traffic from your local machine on port 5901 to the server on the same port.

No comments:

Post a Comment

Thank you for your comment. Will try to react as soon as possible.

Regards,

Networ King