SSH - ASR9K

From DocWiki

Jump to: navigation, search

This guide covers how to setup (or verify) a basic in-band SSH server.

Contents

Software

Ensure the k9 pie is installed. It is necessary for SSH.

RP/0/RSP0/CPU0:ASR9000# admin show install active summary
Default Profile:
  SDRs:
    Owner
  Active Packages:
    disk0:asr9k-mini-p-4.2.3
    disk0:asr9k-k9sec-p-4.2.3
    disk0:asr9k-mpls-p-4.2.3
    disk0:asr9k-mcast-p-4.2.3
    disk0:asr9k-fpd-p-4.2.3

Configuration

Turn on the Server

RP/0/RSP0/CPU0:ASR9000(config)# ssh server v2
RP/0/RSP0/CPU0:ASR9000(config)# commit

Generate the RSA Key

RP/0/RSP0/CPU0:ASR9000# crypto key generate rsa general-keys 

The name for the keys will be: the_default
  Choose the size of the key modulus in the range of 512 to 2048 for your General Purpose Keypair. Choosing a key modulus 
  greater than 512 may take a few minutes.

How many bits in the modulus [1024]: 
Generating RSA keys ...
Done w/ crypto generate keypair
[OK]

Verification

Check for the RSA key

the_default is the key required for SSH to work.

RP/0/RSP0/CPU0:ASR9000# show crypto key mypubkey rsa 

Key label: the_default
Type     : RSA General purpose
Size     : 1024
Created  : 19:45:10 UTC Thu Apr 28 2016

Data     : 
 30819F30 0D06092A 864886F7 0D010101 05000381 8D003081 89028181 00F688C1 
 B1F0FCA5 C85B162C 85200261 00298488 227DD298 F8D888F4 5860B9CE 1A1D8D0E 
 5CA9F7A0 5A6F405A 299DE0E4 6ADF846C 3780909D 8F532238 CF9721BD 12A8B172 
 04047B9E 0B93A72A F60819F3 41465D05 249C7661 F451C197 58F7F3F5 5615342B 
 3FEC78BE B0A985C6 BEA791B7 E61A007E 86B666DB 94EB516D C88FE672 ED020301 
 0001

See if the service is listening

SSH is listening on port 22 on IPv4 and IPv6.

RP/0/RSP0/CPU0:ASR9000# show tcp brief | i 22

0x501f4010 0x60000000      0      0  :::22                  :::0                   LISTEN
0x501f4428 0x00000000      0      0  :::22                  :::0                   LISTEN
0x501d37b4 0x60000000      0      0  0.0.0.0:22             0.0.0.0:0              LISTEN
0x5019e738 0x00000000      0      0  0.0.0.0:22             0.0.0.0:0              LISTEN

Rating: 0.0/5 (0 votes cast)

Personal tools