Skip to content

SSH

Secure Shell (SSH) provides encrypted transport for remote device management on IOS-XR. The server side controls inbound access — protocol version, session limits, cryptographic algorithms, NETCONF subsystem, VRF-scoped ACLs, and authorized public keys. The client side governs outbound SSH connections from the router, including source interface selection, VRF binding, and algorithm preferences. Rekey intervals and DSCP marking are available on both sides to meet compliance and QoS requirements.

Diagram
NameTypeConstraintMandatoryDefault Value
sshClass[ssh]No

NameTypeConstraintMandatoryDefault Value
clientClass[client]No
serverClass[server]No
timeoutIntegerNo

NameTypeConstraintMandatoryDefault Value
algorithmsClass[algorithms]No
disable_hmacsListChoice[sha1, sha2_256, sha2_512]No
dscpIntegermin: 0, max: 63No
enable_ciphersListChoice[aes_cbc, 3des_cbc]No
rekey_timeIntegerNo
rekey_volumeIntegerNo
source_interfaceStringNo
tcp_window_scaleIntegerNo
v1Booleantrue, falseNo
v2Booleantrue, falseNo
vrfStringNo

NameTypeConstraintMandatoryDefault Value
algorithmsClass[algorithms]No
disable_hmacsListChoice[sha1, sha2_256, sha2_512]No
dscpIntegermin: 0, max: 63No
enable_ciphersListChoice[aes_cbc, 3des_cbc]No
loggingBooleantrue, falseNo
max_auth_limitIntegerNo
netconf_portIntegerNo
netconf_vrfsList[netconf_vrfs]No
netconf_xmlBooleantrue, falseNo
portIntegerNo
port_forwarding_localBooleantrue, falseNo
rate_limitIntegermin: 1, max: 600No
rekey_timeIntegerNo
rekey_volumeIntegerNo
session_limitIntegermin: 1, max: 1024No
tcp_window_scaleIntegerNo
usernamesList[usernames]No
v1Booleantrue, falseNo
v2Booleantrue, falseNo
vrfsList[vrfs]No

algorithms (iosxr.devices.configuration.ssh.client)

Section titled “algorithms (iosxr.devices.configuration.ssh.client)”
NameTypeConstraintMandatoryDefault Value
ciphersListStringNo
key_exchangesListStringNo

algorithms (iosxr.devices.configuration.ssh.server)

Section titled “algorithms (iosxr.devices.configuration.ssh.server)”
NameTypeConstraintMandatoryDefault Value
ciphersListStringNo
host_keysListChoice[dsa, ecdsa_nistp256, ecdsa_nistp384, ecdsa_nistp521, ed25519, rsa, rsa_sha256, rsa_sha512, ssh_rsa, x509v3_ssh_rsa]No
key_exchangesListStringNo

netconf_vrfs (iosxr.devices.configuration.ssh.server)

Section titled “netconf_vrfs (iosxr.devices.configuration.ssh.server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
ipv4_access_listStringNo
ipv6_access_listStringNo

usernames (iosxr.devices.configuration.ssh.server)

Section titled “usernames (iosxr.devices.configuration.ssh.server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
keystringStringNo

vrfs (iosxr.devices.configuration.ssh.server)

Section titled “vrfs (iosxr.devices.configuration.ssh.server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
ipv4_access_listStringNo
ipv6_access_listStringNo

Example-1: Enable SSHv2 with DSCP marking and session logging.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
ssh:
server:
dscp: 48
logging: true
v2: true

Example-2: Harden SSH access with rate limiting, session cap, and a non-default port.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
ssh:
server:
v2: true
rate_limit: 60
session_limit: 10
max_auth_limit: 10
port: 5522

Example-3: Restrict SSH access per VRF using IPv4/IPv6 ACLs.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
ssh:
server:
v2: true
vrfs:
- name: VRF1
ipv4_access_list: ACL1
ipv6_access_list: ACL2
- name: MGMT
ipv4_access_list: MGMT_ACL

Example-4: Harden cryptography by disabling weak HMACs, enabling legacy ciphers for compatibility, and key-exchange algorithms.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
ssh:
server:
v2: true
disable_hmacs:
- sha1
enable_ciphers:
- aes_cbc
- 3des_cbc
algorithms:
key_exchanges:
- ecdh-sha2-nistp521
- ecdh-sha2-nistp384
- ecdh-sha2-nistp256
ciphers:
- aes128-ctr
- aes192-ctr
- aes256-ctr

Example-5: Enable NETCONF with VRF-scoped ACLs and periodic rekey.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
ssh:
server:
v2: true
netconf_port: 830
netconf_vrfs:
- name: MGMT
ipv4_access_list: NETCONF_ACL
rekey_time: 60
rekey_volume: 2048