Does ssh-ControlMaster work when vagrant rsyncing?

11 views
Skip to first unread message

Hoshino Tanabe

unread,
Feb 13, 2019, 5:31:34 AM2/13/19
to Vagrant
Hello

I read the codes below and I understand that vagrant creates a temporary directory to set ssh-ControlPath parameter.
I think ssh-ControlPath parameter must be specified socket file path, but vagrant set the already created directory path.
Does this work?


I tried to execute ssh command directly w/o vagrant however it seems like ssh command didn't accept already created directory path for ControlPath.

node01:~ user01$ irb
irb(main):001:0> require 'tmpdir'
=> true
irb(main):002:0> Dir.mktmpdir("vagrant-rsync-")
=> "/tmp/vagrant-rsync-20190213-4021-165zi0m"
irb(main):003:0> exit

node01:~ user01$ ls -al /tmp/vagrant-rsync-20190213-4021-165zi0m
drwx------   2 user01  user01    68  2 13 18:07 .

node01:~ user01$ ssh -o ControlMaster=auto -o ControlPath=/tmp/vagrant-rsync-20190213-4021-165zi0m -o ControlPersist=10m node02
Control socket connect(/tmp/vagrant-rsync-20190213-4021-165zi0m): Socket operation on non-socket
ControlSocket /tmp/vagrant-rsync-20190213-4021-165zi0m already exists, disabling multiplexing
Last login: Wed Feb 13 18:06:56 2019 from node01
[user01@node02 ~]$


Thank you.

--
Hoshino Tanabe

Brian Cain

unread,
Feb 13, 2019, 4:42:44 PM2/13/19
to vagra...@googlegroups.com
Hey there,

I think you are missing the whole command that actually gets invoked. Vagrant does not run ssh in that method, it runs the rsync command.

If you look further down, you'll notice the ssh command is actually used later as a argument to rsync. Hopefully that makes more sense.


--
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/39cdeffb-6581-401e-80d9-80dadd7b93e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Brian Cain
Reply all
Reply to author
Forward
0 new messages