Chris Roberts 90a5854684 Fill out ssh options config and remote_user
Include config option within ssh_config command output template. Default
remote_user value to set username value. Include existence check on
provided config value to ensure file is available. Update tests to
include coverage on all changes. Add new options to the docs.
2018-12-11 08:09:43 -08:00

39 lines
810 B
Plaintext

Host <%= host_key %>
<% if config -%>
Include <%= config %>
<% end -%>
HostName <%= ssh_host %>
User <%= ssh_user %>
Port <%= ssh_port %>
<% if ! verify_host_key || verify_host_key == :never -%>
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
<% end -%>
PasswordAuthentication no
<% if private_key_path -%>
<% private_key_path.each do |path| %>
<% if path.include?(" ") -%>
IdentityFile "<%= path %>"
<% else -%>
IdentityFile <%= path %>
<% end -%>
<% end -%>
<% end -%>
<% if keys_only -%>
IdentitiesOnly yes
<% end -%>
<% if log_level -%>
LogLevel <%= log_level %>
<% else -%>
LogLevel FATAL
<% end -%>
<% if forward_agent -%>
ForwardAgent yes
<% end -%>
<% if forward_x11 -%>
ForwardX11 yes
<% end -%>
<% if proxy_command -%>
ProxyCommand <%= proxy_command %>
<% end -%>