Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Establishing an SSH Connection for a NETCONF Session and cRPD

Establishing an SSH Connection

SSH can be used to establish connections between a configuration management server and a device running Linux OS with cRPD. A configuration management server, as the name implies, is used to configure the device running Linux OS remotely. With SSH, the configuration management server initiates an SSH session with the device running Linux OS.

Enabling SSH

To enable SSH on a cRPD:

  1. Change the root password.

    root@crpd01:/# sudo passwd root

  2. In the /etc/ssh/sshd_config file, specify the following setting:

    root@crpd01:/# PermitRootLogin = yes

  3. Restart the service.

    root@crpd01:/#service ssh restart

Port Forwarding Mechanism

To map a host port to a container port:

Run the following command to map a port on the host with a port on container.

root@crpd01:~# docker run -d --name crpd_instance -p host_port:container_port crpd:latest

root@crpd01:~# docker run -d --name crpd_instance -p 8034:22 crpd:latest

Connecting to a NETCONF Server on Container

Run the script to SSH to cRPD container using NETCONF:

root@crpd01:~# ssh root@<hostip> -p 8034 netconf

The 8034 port on host is mapped to 22 port on container and opens an interactive shell session.