I'm using Itamae with a command like this:
itamae ssh -u ironsand -h xxx.xxx.xxx.xxx cookbooks/user.rb
The ssh configuration are saved with a name my_ssh_config
.
Can I use the ssh config name as a argument of itamae ssh
?
~/.ssh/config
Host my_ssh_config
HostName xxx.xxx.xxx.xxx
User ironsand
As of March 30, support for using ssh config hosts was merged into itamae's master branch:
https://github.com/itamae-kitchen/itamae/pull/115
So as long as you are using a recent copy of itamae, this functionality should be supported:
itamae ssh -h my_ssh_config cookbooks/user.rb
or
itamae ssh --host=my_ssh_config cookbooks/user.rb
You may also need to specify your key file on the command line using the -i
option:
itamae ssh --host=my_ssh_config -i ~/.ssh/my_ssh_host.key cookbooks/user.rb
or with an IdentityFile
stanza in your ssh config:
Host my_ssh_config
HostName xxx.xxx.xxx.xxx
User ironsand
IdentityFile ~/.ssh/my_ssh_host.key
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With