It should a simple question.

I had a vagrant box there, where I can start vagrant ssh to access without password.

And how can I remotely execute ssh command to get some result like below, which can be used in jenkins CI server to check something.

$ vagrant ssh 'who -a' 

My environment

  • Vagrant 0.8.7
  • Ubuntu 11.04 (host)
link|improve this question
feedback

migrated from stackoverflow.com Oct 20 '11 at 11:05

This question came from our site for professional and enthusiast programmers.

1 Answer

The following should work; for more information check out man vagrant, man ssh and man who.

vagrant ssh -c "who -a"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.