VNC password

pvenub

Member
Mar 17, 2014
38
0
6
Want to allow VNC sessions to VM guests, using https://pve.proxmox.com/wiki/Vnc_2.0 for old VNC clients, if I add args: -vnc 0.0.0.0:100,password
the vm will no longer start. If I remove the password from the .conf file vm starts fine. Is there a simple way to use vnc with a password for VM guests?

THank you,
 
Hi, do you simple add ",password" or is password here a synonym for a real password? Because you cannot set the password via this option, this option only tells QEMU that there is a password which is not set at the beginning, you then can use the monitor to change it:
Code:
# via CLI
qm monitor <vmid>
# or go to the webinterface and there to the monitor tab of the VM
# in the monitor enter:
change vnc password
# now enter your desired password
 
yes, i was making mistake of putting my actual pw into this argument in .conf file: args: -vnc 0.0.0.0:100,password

after putting in set_password vnc "string" into the qm monitor I can start the vnc terminal but the password I am entering is not being recognized?

I am using pve 4.0 so not sure if this is correct path to take. does the string 'password' need to be in quotations in the .conf
file as well? Thank you,
 
Last edited:
Oh yes, there was a caveat, it was to long ago that this questions came up and I didn't remembered, sorry.

In the monitor (GUI or CLI) use:
Code:
change vnc password mysecurepasswd12345

Where, as you have probably guessed, "mysecurepasswd12345" should be replaced with your desired password.
This sets the password directly without prompting for it.
 
I keep receiving authentication failure on the vnc terminal no matter how i make password and using different vnc clients....

should i be using inet.d ?
 
Last edited:
Sorry for the latency, does it works with no password?

Firewall open on the needed ports?

I'll retest it tomorrow, I didn't use for some time so not secure, sorry.
 
Yes, VNC terminal work fine with no password.

When I add password to the "vmid".conf file the vnc client then asks for a password properly, but no VNC client I have will accept the password I set in the CLI or monitor... receive 'authentication failed' error
 
Last edited:
Ok can reproduce this (but had to try some VNC clients a few do not work at all, tigervnc seems to work well for now).

Iif you do not need the web noVNC feature for this VM you can get the start command with:
Code:
qm showcmd <VMID>

and remove the "-vnc unix:/var/run/qemu-server/601.vnc,x509,password" part, then execute it and it should work, a bit a dirty work around I know.

Trying it with an x509 and TLS could (should?) be working with both, will try that also but have not that much time available for now so it could take some days (as you probably already realised, I'm having a bit of a response latency at the moment, sorry about that).
 
Do I need to remove the "-vnc unix:/var/run/qemu-server/601.vnc,x509,password" to have the password functionality for tigervnc
to work with a password?

I added x509 to the /etc/pve/local/qemu-server/100.conf file to now be args: -vnc 0.0.0.0:100,x509,password

now the tigervnc asks for a username and password though I don't know what my username is for the machine?

Also, where do I edit that qm showcmd file?
 
Last edited:
root@pox:/# qm showcmd 114
/usr/bin/systemd-run --scope --slice qemu --unit 114 -p KillMode=none -p CPUShares=2048 /usr/bin/kvm -id 114 -chardev socket,id=qmp,path=/var/run/qemu-server/114.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/114.vnc,x509,password -pidfile /var/run/qemu-server/114.pid -daemonize -smbios type=1,uuid=09c6069c-ecfb-425a-a102-532d9cf2d0ec -name 6200 -smp 1,sockets=1,cores=1,maxcpus=1 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga std -no-hpet -cpu kvm64,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_relaxed,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 2912 -k en-us -vnc 0.0.0.0:300,x509,password -device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f -device pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:9a342e4dc4 -drive file=/mnt/sdc1storage/images/114/vm-114-disk-1.raw,if=none,id=drive-ide0,format=raw,cache=none,aio=native,detect-zeroes=on -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -netdev type=tap,id=net0,ifname=tap114i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=3A:34:66:34:32:31,netdev=net0,bus=pci.0,addr=0x12,id=net0 -rtc driftfix=slew,base=localtime -global kvm-pit.lost_tick_policy=discard
root@pox:/#
 
Same problem, pve5.1 won't accept a password for external vnc despite one being set. Is it the wrong username then? (Is there a username?)

Works without a password, but risky to leave open.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!