Tutorial 2 – SSH Configuration
In this video tutorial, we enable the SSH server on IP Infusion OcNOS, create local users with different roles and limit the number of SSH login attempts. SSH is the standard way to manage a router remotely, and these few commands are among the first to configure on any new OcNOS device.
What You Will Learn
Enabling and disabling the SSH server with feature ssh
Checking the SSH server configuration
Creating local users and assigning them one of the four OcNOS roles
Limiting the number of SSH login attempts
Testing SSH access from a Linux client
Enable the SSH Server
OcNOS#configure terminal
OcNOS(config)#feature ssh
OcNOS(config)#commit
OcNOS(config)#end
OcNOS#show running-config ssh serverfeature ssh enables the SSH server, and commit applies the change. show running-config ssh server then confirms that feature ssh is in the configuration. To disable SSH, use the no form of the command:
OcNOS(config)#no feature ssh
OcNOS(config)#commitIn the video, the router is reached through a front-panel interface, in the default VRF. On a physical OcNOS router managed through its eth0 port, which belongs to the management VRF, the command is feature ssh vrf management.
Create Users and Assign Roles
In configuration mode, the username command creates a user, assigns a role and sets the password. OcNOS has four roles:
Role | Permissions |
|---|---|
network-admin | All permissions, the equivalent of a root user |
network-engineer | Can change and save the configuration |
network-operator | Can change the configuration but cannot save it |
network-user | Read-only: cannot change the configuration |
OcNOS(config)#username netadmin role network-admin password Pine#Admin26
OcNOS(config)#username neteng role network-engineer password Pine#Eng2026
OcNOS(config)#username netops role network-operator password Pine#Ops2026
OcNOS(config)#username netuser role network-user password Pine#User26The user names and passwords above are examples. OcNOS requires passwords of 8 to 32 characters with at least one uppercase letter, one lowercase letter, one digit and one special character.
Limit the SSH Login Attempts
OcNOS(config)#ssh login-attempts 3
OcNOS(config)#commitssh login-attempts sets how many authentication attempts an SSH client gets before the router closes the connection. The value goes from 1 to 3, and 3 is also the default, so set 1 or 2 for a stricter limit. SSH keys offered automatically by the client count as attempts too.
Test the Configuration
From a Linux machine (Ubuntu in the video), connect to the router with one of the new users:
user@ubuntu:~$ ssh netadmin@<router-ip>Replace <router-ip> with the address of the router. After the maximum number of wrong passwords, the router disconnects the client, as shown at the end of the video.
Common Mistakes
Forgetting commit: feature ssh and the new users only take effect after commit.
Wrong VRF: if SSH is enabled in the default VRF but you connect through eth0, which is in the management VRF, the connection is refused.
Weak password: a password without a special character, such as StrongPassword123, is rejected.
Locking yourself out: keep a console session open while you test a new SSH configuration.
Go Further
OcNOS Users and Sessions Management covers user roles, session timeouts, login lockout and password policy in detail, with real outputs.
Previous video: Tutorial 1 – IP Interfaces Configuration.
Next video: Tutorial 3 – VLAN Configuration.
