Monday, 27 May 2013

Unable to run a sequence of commands using SSH

Unable to run a sequence of commands using SSH

I am unable to use a couple of sudo commands while logging in through ssh. I am using the following command but its not working properly.
ssh hypr1000.opsr.com "ot=sudo virsh list --all |grep running| awk '{print $2}' | tail -2 ;sudo virsh dominfo $ot"
This is the returned error message:
error: command 'dominfo' requires <domain> option
What should I do to make this command run successfully?

No comments:

Post a Comment