I installed VNC server on a CentOS machine. I set up a user, and then enabled the VNC server for them on startup following these steps: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-remote-access-for-the-gnome-desktop-on-centos-7. I can successfully log into the machine over VNC, but it appears that the VNC users are not sharing the same session... as if I log into the physical machine and start up a process, when the VNC connection is made, nothing is active on the desktop at all. What did I do wrong? I need VNC to allow users to log in and remotely debug software which may or may not have been started by someone logged into the physical machine
I'm not the expert, but I have a friend who uses ssh to easily access my machines, one I give him a login. It's one of many way, but it has worked for me. I don't think it's as secure as VPN, but it has worked out, with no incident so far. He does have a better vantage point to catch unsavory activities. It's not my field, but like I said, it seems to work well.
You could use x11vnc for this. As Root (sudo -i):
yum install x11vnc x11vnc -storepasswd /etc/x11vnc.pass printf '[Unit]\nDescription="x11vnc"\nRequires=display-manager.service\nAfter=multi-user.target\n\n' > /etc/systemd/system/x11vnc.service printf '[Service]\nExecStart=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -auth guess -display :0 -forever -shared -rfbauth /etc/x11vnc.pass -usepw \nExecStop=/usr/bin/killall x11vnc\nRestart=always\nRestartSec=150ms\n\n' >> /etc/systemd/system/x11vnc.service printf '[Install]\nWantedBy=multi-user.target\n\n' >> /etc/systemd/system/x11vnc.service systemctl daemon-reload systemctl enable x11vnc.service systemctl start x11vnc.service
That will share the primary display with anyone who connects and knows the x11 password you set.
Look at the ExecStart line to see what arguments it is using, those are documented here: http://www.karlrunge.com/x11vnc/x11vnc_opts.html