D
D
Daniil Muidinov2016-02-08 10:59:06
SSH
Daniil Muidinov, 2016-02-08 10:59:06

How to execute remote SSH comand on ESXi as non root user?

Good day,

ESXi 6.0 is available to which the user user is added, he has the privileges to create / delete snapshots of one VM and is allowed to SSH on ESXi , I execute it, I execute

Vmid output only for the VM available to him I make a snapshot

ssh [email protected]

[[email protected]:~] vim-cmd vmsvc/getallvms

[[email protected]:~] vim-cmd vmsvc/snapshot.create Vmid 'TST' '' 0 0

All is well in vSphere Client I see:

Create virtual machine snapshot
VM
Completed
user
08.02.2016 13:40:47
08.02.2016 13:40:47
08.02.2016 13:40:48

Путаюсь сделать так

ssh [email protected] 'vim-cmd vmsvc/getallvms'
Выводит список всех машин, а так

ssh [email protected] 'vim-cmd vmsvc/snapshot.create Vmid 'TST' '' 0 0'

В vSphere Client вижу:

Create virtual machine snapshot
VM
Completed
root
08.02.2016 13:43:58
08.02.2016 13:43:58
08.02.2016 13:43:58

Я не понимаю почему remote SSH выполняется от root, и как выполнить команду с привилегиями user?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question