Proxmox Remote administration via VNC

A few times I've needed to communicate via VNC, for instance when I was changing network configuration and couldn't use SSH or when I tried out Windows.

Communicating with VNC to Proxmox wasn't so easy for me as it seemed in the documentation. Basically I never really got the "/etc/inetd.conf" thing to work, but this made it work from my local machine.

This blog post is an alternative to the openbsd-inetd solution

In the following:
2.2.2.2 is the IP of my Proxmox host
100 is the VM-ID you picked when you created the virtual machine

========================================================================
ssh -f -L 25901:127.0.0.1:5910 root@2.2.2.2 'nc -l -p 5910 -c "qm vncproxy 100"'; "/Applications/TigerVNC Viewer 1.2.0.app/Contents/MacOS/TigerVNC Viewer" localhost:25901
========================================================================

Please note that I only got TigerVNC to work, since all the other VNCs had problems.

Click "Yes"

Then you will be asked to login. Here enter the following
login: root@pam
password: <your root password on the proxmox host>


And success, hopefully, now you're connected


NOTES:
Please be aware: The "nc" command will keep running and pipe VNC results to the local port. So if you have multiple machines, you probably should use different ports. An alternative is to find a way to automatically kill inactive connections, which I still haven't found. But I guess at least a shutdown operation after 10 minutes would be easy to implement.


If you're trying to VNC into a OpenVZ container, unfortunatly it's not possible.

And the "Console" in Proxmox is not working either for OpenVZ containers, since you must first enable terminal access. I couldn't get it to work, but the process is described here. Maybe you have better luck.

Instead I just SSH to the Proxmox host, and then login to the openvz machine (Can also be done through the Web UI, just choose Shell on the "host" node)
# vzctl enter 108

Comments

Popular posts from this blog

Running LXD/LXC on WSL2 with Ubuntu 20.04

Installing pikvm on raspberry pi zero 2 w