Aller au contenu

SSH access on Cisco IOS Router

The minimal configuration to access a Cisco IOS router with SSH is the following:

  1. DNS domain specification:

    router(config)# ip domain name isc.heia-fr.ch
    

  2. Creation of the RSA keys:

    router(config)# crypto key generate rsa
    
    You can select here the key size, take a least 2048 bytes.

  3. Create a local user

    router(config)# aaa new-model
    router(config)# username cisco password cisco
    router(config)# service password-encryption
    

  4. Select SSH as the only method to access your device:

    router(config)# line vty 0 4
    router(config-line)#  transport input ssh
    

SSH Server configuration on IOS XRv

The command are not the same with IOS XRv. Here are the different steps:

  1. Creation of the RSA keys:

    router#crypto key generate rsa
    
    You can select here the key size, take a least 2048 bytes.

  2. Activate the SSH Server:

    router(config)# ssh server v2
    

  3. If the SSH access is made in a particular VRF:

    router(config)# ssh server vrf mgmt
    

  4. Select SSH as the only method to access your device:

    router(config)# line default transport input ssh
    


Dernière mise à jour: 3 October 2023