since we merged multiple private keys, the :private_key_path item of ssh_info now comes back as an array. the ssh-config command had not yet been updated to handle this properly. here we fix that oversight and add a few unit tests around the config generation.
23 lines
479 B
Plaintext
23 lines
479 B
Plaintext
Host <%= host_key %>
|
|
HostName <%= ssh_host %>
|
|
User <%= ssh_user %>
|
|
Port <%= ssh_port %>
|
|
UserKnownHostsFile /dev/null
|
|
StrictHostKeyChecking no
|
|
PasswordAuthentication no
|
|
<% private_key_path.each do |path| %>
|
|
<% if path.include?(" ") -%>
|
|
IdentityFile "<%= path %>"
|
|
<% else -%>
|
|
IdentityFile <%= path %>
|
|
<% end -%>
|
|
<% end -%>
|
|
IdentitiesOnly yes
|
|
LogLevel FATAL
|
|
<% if forward_agent -%>
|
|
ForwardAgent yes
|
|
<% end -%>
|
|
<% if forward_x11 -%>
|
|
ForwardX11 yes
|
|
<% end -%>
|