LMBTIC

Soluções e Informações em TI e Comunicação

10 Jan 2022

Enabling SSH Server on Cisco iOS and Debian

In this article you will see howto configure ssh server services in Cisco iOS switches and routers and also Linux Distro Debian. For all systems, the networking addressing and cabling needs to be done for validate this settings.


Cisco iOS Routers and Switches

With access in the CLI of Cisco device, make sure if the device have a hostname, SVI and IP stuffs configured, then, input the commands bellow:

S1(config)#ip domain-name domain.com

S1(config)#crypto key generate rsa

S1(config)#username admin secret setpasswordstrong

S1(config)#line vty 0 15

S1(config-line)#transport input ssh

S1(config-line)#login local

S1(config-line)#exit

S1(config-line)#ip ssh version 2

S1(config-line)#exit

S1(config)#enable secret setapasswordstrong2

S1(config)#do copy run st

After this, try access with a client ssh the ip device in the port 22


Debian Linux distro

For debian 9, 10 and 11

Installation of the ssh server

The server allows to connect remotely and gets installed by running as root:

apt install openssh-server

After this, try access with a client ssh the ip device in the port 22

TIP: ou can manage some settings if need in the files in the directory /etc/ssh :

  • sshd_config : server configuration file

Or, configuration files will also be read from the following subfolders :

  • /etc/ssh/sshd_config.d/*.conf : server configuration file

That’s all!

If you liked or help, leave in the comments bellow! Tks! 😉

Peace!

Comments: