-->
🏠 🔍
SHAREOLITE

Enable SSH Cisco Switch Router Add SSH user command line


A step by step simple command line procedure to enable SSH server and add a ssh user in Cisco switch or router .


Set a Hostname for the switch/ router

Switch1(config)#hostname Switch1

Set a domain name , this is one of the pre-requisite for ssh.

Switch1(config)#ip domain-name shareolite.com

Generate a RSA key, 

Switch1(config)#crypto key generate rsa
The name for the keys will be: Switch1.shareolite.com
Choose the size of the key modulus in the range of 360 to 2048 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

Switch1(config)#
*Mar  1 00:56:15.718: %SSH-5-ENABLED: SSH 1.99 has been enabled
Switch1(config)#
Switch1(config)#^Z

Switch1#
*Mar  1 00:56:29.928: %SYS-5-CONFIG_I: Configured from console by console
Switch1#

Verify the activation status.

Switch1#show ssh
%No SSHv1 server connections running.
%No SSHv2 server connections running.

Switch1#show ip ssh
SSH Enabled - version 1.99
Authentication timeout: 120 secs; Authentication retries: 3
Switch1#

Creating a SSH user, 

Switch1# config t
Switch1(config)#line vty 0 5
Switch1(config-line)#transport input ssh
Switch1(config-line)#username John privilege 15 password john123
Switch1(config-line)#login local
Switch1(config-line)#^Z
Switch1#wr

Verify SSH login from a terminal using this account. Hope this helps to some network beginners.
Comments

–>