Can I use ssh configuration name when using Itamae

I use Itamae with a command like this:

itamae ssh -u ironsand -h xxx.xxx.xxx.xxx cookbooks/user.rb 

The ssh configuration is saved with the name my_ssh_config . Can I use the ssh configuration name as an argument to itamae ssh ?

my ~/.ssh/config

 Host my_ssh_config HostName xxx.xxx.xxx.xxx User ironsand 
+7
provisioning itamae
source share
1 answer

As of March 30, support for using ssh config hosts has been merged with the itamae lead branch:

https://github.com/itamae-kitchen/itamae/pull/115

So, while 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 the 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 the IdentityFile line in your ssh configuration:

 Host my_ssh_config HostName xxx.xxx.xxx.xxx User ironsand IdentityFile ~/.ssh/my_ssh_host.key 
+4
source share

All Articles