Update netconf jumphost documentation (#47339)

* doc/update netconf jumphost docs

* Remove requirement for nc. Option for Port 830

Based on https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts#Passing_Through_a_Gateway_Using_stdio_Forwarding_(Netcat_Mode)

* Fix formatting

* More formatting fixes

* Remove incorrectly added newline
This commit is contained in:
markafarrell 2018-10-24 05:06:19 +11:00 committed by Sandra McCann
parent 85ba30a3db
commit 94eab56d51

View file

@ -615,13 +615,15 @@ Using bastion/jump host with netconf connection
Enabling jump host setting Enabling jump host setting
-------------------------- --------------------------
Bastion/jump host with netconf connection can be enable using
- Setting Ansible variable``ansible_netconf_ssh_config`` either to ``True`` or custom ssh config file path Bastion/jump host with netconf connection can be enabled by:
- Setting environment variable ``ANSIBLE_NETCONF_SSH_CONFIG`` to ``True`` or custom ssh config file path - Setting Ansible variable ``ansible_netconf_ssh_config`` either to ``True`` or custom ssh config file path
- Setting ``ssh_config = 1`` or ``ssh_config = <ssh-file-path>``under ``netconf_connection`` section - Setting environment variable ``ANSIBLE_NETCONF_SSH_CONFIG`` to ``True`` or custom ssh config file path
- Setting ``ssh_config = 1`` or ``ssh_config = <ssh-file-path>`` under ``netconf_connection`` section
If the configuration variable is set to 1 the proxycommand and other ssh variables are read from If the configuration variable is set to 1 the proxycommand and other ssh variables are read from
default ssh config file (~/.ssh/config). default ssh config file (~/.ssh/config).
If the configuration variable is set to file path the proxycommand and other ssh variables are read If the configuration variable is set to file path the proxycommand and other ssh variables are read
from the given custom ssh file path from the given custom ssh file path
@ -630,11 +632,28 @@ Example ssh config file (~/.ssh/config)
.. code-block:: ini .. code-block:: ini
Host jumphost
HostName jumphost.domain.name.com
User jumphost-user
IdentityFile "/path/to/ssh-key.pem"
Port 22
# Note: Due to the way that Paramiko reads the SSH Config file,
# you need to specify the NETCONF port that the host uses.
# i.e. It does not automatically use ansible_port
# As a result you need either:
Host junos01 Host junos01
HostName junos01 HostName junos01
User myuser ProxyCommand ssh -W %h:22 jumphost
ProxyCommand ssh user@bastion01 nc %h %p %r # OR
Host junos01
HostName junos01
ProxyCommand ssh -W %h:830 jumphost
# Depending on the netconf port used.
Example Ansible inventory file Example Ansible inventory file