Author: Raghav Subbaraman
For everyone working from home (Coronavirus crisis of 2020), it is important to understand certain good practices as well as usefulness of various methods to allow secure and functional remote access.
sudo apt install openssh-server
ssh -X <yourusername>@<yourmachineip>
ssh -XC <yourusername>@<yourmachineip>
For those not having any specific need like accessing a Windows system, there’s the easy way to do Remote Desktop (TeamViewer), and the correct way to do it (VNC over SSH).
~/.vnc/xstartup #!/bin/bash unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS xrdb $HOME/.Xresources startxfce4 &
vncserver :2 -localhost -geometry 1920x1080 -depth 24