Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Establish an SSH Connection for a NETCONF Session and cRPD

date_range 10-Dec-24
SSH can be used to establish connections between a configuration management server and a device running Linux OS with cRPD.

Establish an SSH Connection

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.

Enable SSH

To set up remote access using SSH service on a cRPD:

  1. Enable SSH access.

    [edit groups global]

    user@host# set system services ssh

  2. Commit the configuration.

    user@host# commit

Connect to a NETCONF Server on Container

  1. Log in to the container for crpd02.

    root@crpd01:/usr/bin# docker exec -it crpd02 bash

  2. Copy the IP address.

    root@6918f17c5851:/# ifconfig eth0

    content_copy zoom_out_map
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 172.17.0.14  netmask 255.255.0.0  broadcast 172.17.255.255
  3. Configure root-authentication, netconf and ssh, and commit the config.

    [edit system]

    root@crpd01# set root-authentication plain-text-password "<password>"

    root@crpd01# set services ssh root-login allow

    root@crpd01# set services netconf ssh port 8034

  4. Log in to the cRPD container using NETCONF:

    root@crpd01:/usr/bin ssh root@172.17.0.14 -p 8034 netconf

    content_copy zoom_out_map
    Password:
    <!-- No zombies were killed during the creation of this user interface -->
    <!-- user root, class super-user -->
    <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    ...
    

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

footer-navigation