How do I login into VPS without knowing its root password?

As the hardware node administrator, to log into a VPS, you may issue the following command:



# vzctl enter 101



To run a command inside a VPS, you may use the vzctl command thusly (using VE 101 and /bin/ls as examples):



# vzctl exec 101 /bin/ls



If you need to ssh into VPS 101 as root, you can add a user with UID=0
to /vz/root/101/etc/passwd and set a password for that user using:



# vzctl exec 101 passwd username

Your rating: None