Ticker

6/recent/ticker-posts

1.3.6 Packet Tracer – Configure SSH (Español)

 

1.3.6 Packet Tracer – Configure SSH

Tabla de direccionamiento


Dispositivo

Interfaz

Dirección/prefijo IP

Máscara de subred

S1

VLAN 1

10.10.10.2

255.255.255.0

PC1

NIC

10.10.10.10

255.255.255.0

 

Objetivos

  • Parte 1: Proteger las contraseñas
  • Parte 2: Cifrar las comunicaciones
  • Parte 3: Verificar la implementación de SSH

Aspectos básicos

SSH debe reemplazar a Telnet para las conexiones de administración. Telnet usa comunicaciones inseguras de texto no cifrado. SSH proporciona seguridad para las conexiones remotas mediante el cifrado seguro de todos los datos transmitidos entre los dispositivos. En esta actividad, protegerá un switch remoto con contraseñas cifradas y SSH.

Instrucciones

Parte 1: Proteger las contraseñas

a. Desde el símbolo del sistema en la PC1, acceda al S1 mediante Telnet. El usuario EXEC y la contraseña EXEC es cisco.

1.3.6 Packet Tracer – Configure SSH (Español)

b. Guarde la configuración actual, de manera que pueda revertir cualquier error que cometa reiniciando el S1.

S1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
S1#

 

c. Muestre la configuración actual y observe que las contraseñas están en texto no cifrado. Introduzca el comando para cifrar las contraseñas de texto no cifrado.

S1#show running-config
Building configuration...
Current configuration : 1144 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname S1
!
enable password cisco
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 10.10.10.2 255.255.255.0
!
!
line con 0
!
line vty 0 4
password cisco
login
line vty 5 15
password cisco
login
!
!
end
S1#configure terminal
S1(config)#service password-encryption
S1(config)#

Nota: Si te fijas al aplicar este comando nuestra puntuacion a aumentado al 20%.

d. Verifique que las contraseñas estén cifradas

S1#show running-config
Building configuration...
Current configuration : 1168 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname S1
!
enable password 7 0822455D0A16
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 10.10.10.2 255.255.255.0
!
!
line con 0
!
line vty 0 4
password 7 0822455D0A16
login
line vty 5 15
password 7 0822455D0A16
login
!
!
end

Contraseñas cifradas


Parte 2: Cifrar conexiones

Paso 1: Establecer el nombre de dominio IP y generar claves seguras..
En general no es seguro utilizar Telnet, porque los datos se transfieren como texto no cifrado. Por lo tanto, utilice SSH siempre que esté disponible.

a. Configure el nombre de dominio netacad.pka.

S1#configure terminal
S1(config)#ip domain-name netacad.pka
S1(config)#

Nota: Hasta este punto nuestra puntuación deberia estar al 40%.

b. Se necesitan claves seguras para cifrar los datos. Genere claves RSA con una longitud de clave de 1024.

S1(config)#crypto key generate rsa
The name for the keys will be: S1.netacad.pka
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]
S1(config)#

Nota: Hasta este punto nuestra puntuación deberia estar al 60%.

Paso 2: Cree un usuario de SSH y reconfigure las líneas VTY para que solo admitan acceso por SSH.
a. Cree un usuario administrator (ingles) con cisco como contraseña secreta.

S1(config)#username administrator secret cisco
S1(config)#

Nota: Hasta este punto nuestra puntuación deberia estar al 80%.

b. Configure las líneas VTY para que revisen la base de datos local de nombres de usuario en busca de las credenciales de inicio de sesión y para que solo permitan el acceso remoto mediante SSH. Elimine la contraseña existente de la línea vty.

S1(config)#line vty 0 15
S1(config-line)#login local
S1(config-line)#transport input ssh
S1(config-line)#no password cisco
S1#

Nota: Hasta este punto nuestra puntuación deberia estar al 100%.


Paso 3: Verifique la implementación SSH

a. Cierre la sesión de Telnet e intente iniciar sesión nuevamente con Telnet. El intento debería fallar.

C:\>telnet 10.10.10.2
Trying 10.10.10.2 ...Open
[Connection to 10.10.10.2 closed by foreign host]

 

b. Intente iniciar sesión mediante SSH. Escriba ssh y presione la tecla Enter , sin incluir ningún parámetro que revele las instrucciones de uso de comandos. Sugerencia: La opción-l representa letter “L”, no el numero 1.

C:\>ssh
Packet Tracer PC SSH
Usage: SSH -l username target
C:\>ssh -l administrator 10.10.10.2
Password:

c. Cuando inicie sesión de forma correcta, ingrese al modo EXEC con privilegios y guarde la configuración. Si no pudo acceder de forma correcta al S1, reinicie y comience de nuevo en la parte 1.

S1>enable
Password:
S1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
S1#