matschaffer / knife-solo

DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas
MIT License
787 stars 213 forks source link

knife solo with ssh-gateway where usernames differ fails in rsync #484

Open ghost opened 8 years ago

ghost commented 8 years ago

We use a bastion host, and the knife solo command, when given with different usernames for the target host (where chef should run), and the bastion host (which we're just passing through), seems to fail in the rsync due to not being able to create the cookbooks-1 directory. Typical command is something like:

knife solo cook user@target --ssh-gateway other-user@bastion-host

where target and bastion-host are the two hosts.

florian-asche commented 8 years ago

Did you try to use ssh proxy instead? You can configure in .ssh/config. Use it, and it works great. Maybe a solution for you, if bastion host acts like a normal ssh server.

matschaffer commented 8 years ago

:+1: for ssh ProxyCommand settings. I use it all the time and it greatly simplifies the use of any number of bastion hosts.