Closed monofonik closed 8 years ago
This is odd, .ssh/config
should be read when using rsync with --rsh
.
Do you have the same problem when using rsync --rsh="ssh -p2222" -r test vagrant@web.xyz.local:
?
To answer the other part of the question: It is possible to use a library to read .ssh/config
and create the target configuration on the fly. If the library of your choice parses the configuration asynchronously, you can use dynamic host configuration.
Please note that Flightplan was built around the idea of having a config that's being shared by a team and not everybody has the same local setup.
Let me know if you need further assistance, otherwise I would be glad if you could put your solution here, so it could be added to the README or even built in as a core functionality.
Thanks for your reply.
Yes executing rsync --rsh="ssh -p2222" -r test vagrant@web.xyz.local:
works as expected. I'll post here if / when I have a solution. Thanks for the tip re. reading the .ssh/config
, will go down that path if necessary.
Cheers
@monofonik did you manage to solve this? How about sharing some code for the docs or wiki?
Not solved yet unfortunately, although I think the problem may only be affecting my Mac environments. Will report back here when I have more detailed info.
This was a bit of a red herring - you might have noticed by some details provided above that this error was occurring in the context of deploying to a Vagrant VM.
I've managed to solve this by not using the port forwarded by vagrant for SSH. Instead I just configure flightplan to connect directly to the Vagrant VM on the standard SSH port (22) which my VM config exposes.
I just published flightplan-sshconf to provide this functionality. Hope it helps :)
That's great! :-)
Is there a way to just use the current user's
.ssh/config
instead of specifying everything inplan.target
?Here's the relevant part of my
.ssh/config
:I can rsync to my target machine from the command line successfully like this:
rsync -r test vagrant@web.xyz.local:
However the rsync command during deployment prompts for a password:
Am I missing something here?