Skip to content

Example: ssh test

Alt text

r1

hostname r1
vrf def v1
 rd 1:1
 exit
int lo0
 vrf for v1
 ipv4 addr 2.2.2.2 255.255.255.255
 exit
int eth1
 vrf for v1
 ipv4 addr 1.1.1.1 255.255.255.0
 ipv6 addr 1234::1 ffff::
 exit
aaa userlist usr
 username c password c
 username c privilege 14
 exit
crypto rsakey rsa generate 2048
crypto dsakey dsa generate 1024
crypto ecdsakey ecdsa generate 256
server telnet ssh
 security rsakey rsa
 security dsakey dsa
 security ecdsakey ecdsa
 security authentication usr
 security protocol ssh
 port 666
 vrf v1
 exit

r2

hostname r2
vrf def v1
 rd 1:1
 exit
int eth1
 vrf for v1
 ipv4 addr 1.1.1.2 255.255.255.0
 ipv6 addr 1234::2 ffff::
 exit
r1 tping 100 5 1.1.1.2 vrf v1
r2 send telnet 1.1.1.1 666 vrf v1 ssh
r2 send c
r2 send c
r2 tping 100 5 2.2.2.2 vrf v1
  1. Install ContainerLab as described here
  2. Fetch crypt-ssh file
  3. Launch ContainerLab crypt-ssh.yml topology:

   containerlab deploy --topo crypt-ssh.yml  
4. Destroy ContainerLab crypt-ssh.yml topology:

   containerlab destroy --topo crypt-ssh.yml  
5. Copy-paste configuration for each node in the lab topology

  1. Fetch or compile freeRtr rtr.jar file.
    You can grab it here
  2. Fetch crypt-ssh.tst file here
  3. Launch crypt-ssh.tst test:

   java -jar ../../rtr.jar test tester crypt-ssh path ./ temp ./ wait
4. Destroy freeRtr crypt-ssh.tst test:

   Ctrl-C (In freeRtr test window)