VM Commands not working over SSH

hwhjake

New Member
Aug 10, 2020
3
0
1
28
Hi Everyone,

I'm completely new so this might be a really easy one for you. :)

When running commands such as 'qm list' from within the shell on the web interface, it returns a list of my VM's. But when running the exact same command logged in as root via putty/ssh, i get 'command not found'. (pic attached) 1597094306419.png

Thanks in advance!
Jake
 
My first guess would be that the PATH variable is not set correctly when using ssh
since the putty session seems to indicate that you intially logged in as user kirby - how did you become root?
(su? sudo?)

if su - check https://wiki.debian.org/NewInBuster

else - does it work if you run `/usr/sbin/qm list`

I hope this helps!
 
  • Like
Reactions: hwhjake
Yep by default it wont let me login as root so have to login as my kirby account then 'su' to root. running the command as '/usr/sbin/qm list' gave me a result.

Thank you Stoiko :)
 
Yep by default it wont let me login as root so have to login as my kirby account then 'su' to root. running the command as '/usr/sbin/qm list' gave me a result.

Thank you Stoiko :)

if you run su root then the environment will still belong to the previous user.

instead you can run su - root (note the dash) or sudo -i to set the environment correctly. that way qm and other commands in sbin will work normally
 

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!