Pages

How to Reset a Linux Guest Password in Proxmox (via QEMU Guest Agent)

Today I faced a simple but tricky task: logging into a Ubuntu Server without knowing the password. Easy? Usually yes, but not when you're locked out.

Fortunately, the VM was running on Proxmox with the QEMU Guest Agent installed and enabled. This makes resetting the credentials a breeze, as it allows the host to communicate directly with the guest OS.

Here is the quick workflow:


First, log into your Proxmox shell (via SSH or the web console) and list all running VMs to find the correct ID:

root@proxmox:~# qm list


Once you have the VM ID (e.g., 101) and the username (e.g., root or ubuntu), run the following command:

root@proxmox:~# qm guest passwd <VM_ID> <username>


Proxmox will prompt you to enter the new password twice. After that I was able to log into the Ubuntu Server!


That's all!

How to open/close port on Windows Server firewall

To open port on Windows Server firewall I am using this command:

netsh advfirewall firewall add rule name="My rule name port 12345" dir=in action=allow protocol=TCP localport=12345


For port close the command is like that:

netsh advfirewall firewall delete rule name="My rule name port 12345"


That's all.

Link to Microsoft article is here.