Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with -i argument to rsync/ssh #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix problem with -i argument to rsync/ssh #17

wants to merge 1 commit into from

Conversation

Luv2C0d3
Copy link

@Luv2C0d3 Luv2C0d3 commented Dec 7, 2014

Hi, I found a small problem with the rsync command when using non-default ssh keys. I noticed things would work only if I would create a ~/.ssh/config file and add there by hand the server I wanted to rsync to plus the key I wanted to use. Spelunked a bit more and put the following two statements near the point you create the rsync command and got this:

ssh_info: {:host=>"165.225.167.219", :port=>22, :private_key_path=>["/home/vagrant/.ssh/joyent_id_rsa"], :username=>"ubuntu", :forward_agent=>false, :forward_x11=>false}
==> ktest: Rsyncing folder: /host_user/Documents/Impinj/inf_1/VMs/ => /vagrant
Rsync command => rsync --verbose --archive -z -e ssh -o StrictHostKeyChecking=no -p 22 -i '' /host_user/Documents/Impinj/inf_1/VMs/ [email protected]:/vagrant

So, in the code you seem to be giving as key path to the ssh -i argument, the keyfile element of your vagrant provider, but that item is not part of the ssh_info hash which you are using to populate your rsync. The needed info however is in ssh_info[:private_key_path] as can be seen above.

So I just changed that and now I do not need to use a .ssh/config file.

HTH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant