Friday, June 15, 2018

CentOS 7 Remote Access / RDP / VNC

I recently signed up for a small hosted server with the friendly folks over at Linode.  For $5 per month, you can't really go wrong (1 GB RAM, 25 GB storage and 1 TB monthly transfer).  I opted for a Centos7 VM and was quite quickly up and running.  I created a DNS alias at FreeDNS as I kept forgetting my VM's IP.

I also configured SSH to use a non-standard port, as /var/log/secure was showing constant attempted logins from some overly friendly IP's in China.  I also blocked a couple of the most prevalent IP's.  I disabled the ability for root to directly ssh, opting to rather login as my "normal" user and sudo as required, to add another level of protection.

One bit I struggled with was remote GUI access, as I wanted this to be a general purpose box (followed Gnome install guide here).  I'm currently testing the third method on this page (XRDP) - it seems to have been the quickest to get up and running, but thus far is glacially slow - will udpate if I find a fix.  Might help somebody else in a pinch.  XRDP installation:

# yum -y install epel-release
# yum -y install xrdp
# systemctl start xrdp.service
# systemctl enable xrdp.service


UPDATE: Durrrr, modern Gnome and only 1 GB RAM do  not good bedfellows make - reverted Gnome install with:

# yum groupremove "GNOME Desktop" "Graphical Administration Tools"

And courtesy of this guide over at rootuesrs.com, installed Xfce:

# yum install epel-release -y
# yum groupinstall "Server with GUI" -y
# systemctl get-default
If not graphical.target
# systemctl set-default graphical.target

Something broke (XRDP VNC startup error), had to uninstall xrdp and then re-install VNC and xrdp:
# yum remove xrdp tightvncserver
# yum install tightvncserver
# yum install xrdp
# systemctl start xrdp.service
# systemctl enable xrdp.service
# reboot

And more woes, once RDP'd in - no menu bar or window controls:
Right-click on desktop and select Terminal - update this once proper fix found
$ xfce4-panel
$ xfwm4
Useful:
$ xfce4-settings-manager

No comments: