Interesting solution 'vagrant ssh -- pwd' works!
-- is used in unix to pass options to the program next 'down the line' which is the standard unix ssh on the host. I do not understand why -c or --command does not work as documented but I don't want to spend today reading ruby :) On Monday, September 4, 2017 at 7:11:59 AM UTC-4, Brandon Sussman wrote: > > 1. It would be unusual for quotes to be required whan a parm value is a > single word. > 2. here is the console output showing the ssh logging in instead of doing > what the doc says it should and the command manually entered with it's > output, followed by the standard logout, being ctl-d: > > Besides, I do not want ls -al, I want ls. > > > vagrant ssh -c 'ls -al' > vagrant@www:~$ ls -al > total 40 > drwxr-xr-x 4 vagrant vagrant 4096 Sep 4 11:03 . > drwxr-xr-x 4 root root 4096 Sep 3 17:26 .. > -rw------- 1 vagrant vagrant 111 Sep 4 11:06 .bash_history > -rw-r--r-- 1 vagrant vagrant 220 Jan 15 2017 .bash_logout > -rw-r--r-- 1 vagrant vagrant 3486 Jan 15 2017 .bashrc > drwx------ 2 vagrant vagrant 4096 Jan 15 2017 .cache > -rw-r--r-- 1 vagrant vagrant 773 Jan 15 2017 .profile > -rw-rw-r-- 1 vagrant vagrant 17 Jan 15 2017 shutdown.sh > drwx------ 2 vagrant root 4096 Sep 3 17:25 .ssh > -rw-r--r-- 1 vagrant vagrant 6 Jan 15 2017 .vbox_version > vagrant@www:~$ exit > Connection to 127.0.0.1 closed. > > > > > > On Monday, September 4, 2017 at 12:53:29 AM UTC-4, Alvaro Miranda Aguilera > wrote: >> >> vagrant ssh -c 'ls -al' >> >> Alvaro >> >> On Fri, Sep 1, 2017 at 4:43 PM, Brandon Sussman <webste...@gmail.com> >> wrote: >> >>> vagrant ssh >>> >>> works - connects me as user vagrant >>> >>> vagrant ssh -c ls >>> >>> does the exact same thing - connects me as user vagrant, does not >>> execute the command. >>> >>> Why? >>> >>> Verbatim from doc: This should 'execute a single SSH command, prints out >>> the stdout and stderr, and exit'. >>> >>> -- >>> This mailing list is governed under the HashiCorp Community Guidelines - >>> https://www.hashicorp.com/community-guidelines.html. Behavior in >>> violation of those guidelines may result in your removal from this mailing >>> list. >>> >>> GitHub Issues: https://github.com/mitchellh/vagrant/issues >>> IRC: #vagrant on Freenode >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Vagrant" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to vagrant-up+...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/vagrant-up/1d3aa196-5458-4482-962f-ca3750be3d83%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/vagrant-up/1d3aa196-5458-4482-962f-ca3750be3d83%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Alvaro >> >> -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/e136850e-8bfe-4828-ba3b-fe906f628718%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.