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

Knife ignores ssh config file #167

Open
unlimit opened this issue Nov 12, 2022 · 2 comments
Open

Knife ignores ssh config file #167

unlimit opened this issue Nov 12, 2022 · 2 comments

Comments

@unlimit
Copy link

unlimit commented Nov 12, 2022

Hi!
Is it possible to use ssh config file or ssh agent with knife zero?
I was able to use it with '-i ~/path_to_key' option only. I there a better alternative for it?

@sawanoboly
Copy link
Member

I remember that the knife ssh function, which is the basis of knife-zero, refers to ~/.ssh/config. You may want to experiment with different configurations.

https://docs-archive.chef.io/release/11-4/knife_ssh.html

@unlimit
Copy link
Author

unlimit commented Nov 19, 2022

It seems ssh/config is ignored by bootstrap command only.
At the same time:
/bin/knife zero converge - works with ssh/config
/bin/knife ssh - works with ssh/config

Is it possible to use ssh forward agent with /bin/knife zero converge ?
I have this option set in config file knife[:forward_agent] = true
But it doesn't help, ssh-agent is not running. My recipe fails with STDERR: Could not open a connection to your authentication agent

knife -v
Chef Infra Client: 18.0.185

chef -v
Chef Workstation version: 22.10.1013
Chef Infra Client version: 17.10.0
Chef InSpec version: 4.56.20
Chef CLI version: 5.6.1
Chef Habitat version: 1.6.521
Test Kitchen version: 3.3.2
Cookstyle version: 7.32.1

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

No branches or pull requests

2 participants