- ИТ База знаний
- Полезно
- Навигация
- Серверные решения
- Телефония
- Корпоративные сети
- Настройка доступа к Cisco по SSH
- Бесплатный вводный урок на онлайн курс по Сетевым Технологиям
- Настройка
- Бесплатный вводный урок на онлайн курс по кибербезопасности
- Полезно?
- Почему?
- 1.3.6 Packet Tracer – Configure SSH (Instructions Answer)
- 1.3.6 Packet Tracer – Configure SSH (Instructor Version)
- Addressing Table
- Objectives
- Background
- Instructions
- Part 1: Secure Passwords
- Part 2: Encrypt Communications
- How to Configure SSH in Cisco Packet Tracer
- How to Enable SSH in Cisco Router with Packet Tracer
- Final Word
- Configuration of SSH on Cisco Switch in Packet Tracer
- Configuration of SSH on Cisco Switch in Packet Tracer
- Crate a Packet Tracer Topology Lab
- Basic IP Setting for connectivity
- Set host-name and domain-name on Switch
- Set console and enable password for SSH login
- Generate the RSA Keys
- Setup the Line VTY configurations
- Create the username password for SSH access from PC
- Verify SSH access from Host
ИТ База знаний
Курс по Asterisk
Полезно
— Узнать IP — адрес компьютера в интернете
— Онлайн генератор устойчивых паролей
— Онлайн калькулятор подсетей
— Калькулятор инсталляции IP — АТС Asterisk
— Руководство администратора FreePBX на русском языке
— Руководство администратора Cisco UCM/CME на русском языке
— Руководство администратора по Linux/Unix
Навигация
Серверные решения
Телефония
FreePBX и Asterisk
Настройка программных телефонов
Корпоративные сети
Протоколы и стандарты
Настройка доступа к Cisco по SSH
В Cisco Packet Tracer
Если вы работаете в IT, то наверняка тысячу раз сталкивались с необходимостью зайти на какое-то устройство или сервер удалённо – такая задача может быть выполнена несколькими путями, основные два для управления устройством через командную строку – Telnet и Secure Shell (SSH) .
Бесплатный вводный урок на онлайн курс по Сетевым Технологиям
В курсе тебя ждет концентрат ТОП 15 навыков, которые обязан знать ведущий инженер или senior Network Operation Engineer
Между ними есть одно основное различие – в протоколе Telnet все данные передаются по сети в незашифрованном виде, а в случае SSH все команды шифруются специальным ключом. SSH был разработан как замена Telnet, для безопасного управления сетевыми устройствами через небезопасную сеть, такую как Интернет. На всякий случай запомните, что Telnet использует порт 22, а SSH – 23.
Поэтому наша рекомендация – используйте SSH всегда, когда возможно.
Настройка
Для начала, вам понадобится Packet Tracer – программа для эмуляции сетей от компании Cisco. Он полностью бесплатен и его можно скачать с сайта netacad.com после регистрации. Запустите Packet Tracer и приступим к настройке.
Постройте топологию как на скриншоте ниже – один компьютер и один коммутатор третьего уровня. Нужно будет подключить их между собой и приступить к настройке.
Готово? Теперь обеспечим сетевую связность и настроим интерфейс vlan 1 на коммутаторе, для этого введите следующие команды:
Если сразу после создания в консоли коммутатора будет вопрос начать ли диалог изначальной настройки – ответьте «No».
Далее, настроим сетевую карту компьютера – укажем сетевой адрес в настройках FastEthernet0: 192.168.1.2. По умолчанию все новые компьютеры будут находиться в vlan 1.
Теперь давайте попробуем пингануть коммутатор и зайти на него по протоколу telnet с нашего ПК на коммутатор – и вы увидите, что соединение будет отклонено по причине того, что мы еще не настроили аутентификацию на коммутаторе.
Перейдем к настройке аутентификации. Система поддерживает 20 виртуальных tty/vty линий для Telnet, SSH и FTP сервисов. Каждая сессия, использующая вышеупомянутый протокол занимает одну линию. Также можно усилить общую безопасность с помощью валидации запросов на авторизацию на устройстве. Перейдите обратно в режим общей конфигурации (conf t) на коммутаторе с помощью команды exit и введите следующие команды:
Пароль cisco, используемый в статье, является крайне небезопасным и служит исключительно для демонстрационных целей. Если вы оставите такой пароль на настоящем оборудовании, шансы, что вас взломают будут стремиться к бесконечности. Лучше используйте наш генератор устойчивых ко взлому паролей 🙂
Теперь снова попробуйте зайти по Telnet на свитч – все должно получиться! Однако, при попытке перейти к настройке и выполнении команды enable вы увидите, что это невозможно, по причине того, что не установлен пароль на глобальный режи enable.
Чтобы исправить это, введите следующие команды:
Попробуйте еще раз – теперь все должно получиться!
Теперь настроим SSH на коммутаторе – для этого обязательно нужно указать хостнейм, доменное имя и сгенерировать ключ шифрования.
Вводим следующие команды (из основного конфигурационного режима):
Выбираем длину ключа – по умолчанию значение стоит равным 512 битам, для SSH версии 2 минимальная длина составляет 768 бит. Генерация ключа займет некоторое время.
После генерации ключа продолжим настройку коммутатора:
Теперь зайти по протоколу Telnet уже не выйдет, так как мы заменили его на SSH. Попробуйте зайти по ssh, используя логин по умолчанию – admin. Давайте-ка поменяем его на что-то поприличнее (опять из conf t):
Теперь попробуйте зайти с рабочей станции на коммутатор и удостоверьтесь, что новые настройки вступили в силу.
Бесплатный вводный урок на онлайн курс по кибербезопасности
Изучи хакерский майндсет и научись защищать свою инфраструктуру! Самые важные и актуальные знания, которые помогут не только войти в ИБ, но и понять реальное положение дел в индустрии
Полезно?
Почему?
😪 Мы тщательно прорабатываем каждый фидбек и отвечаем по итогам анализа. Напишите, пожалуйста, как мы сможем улучшить эту статью.
😍 Полезные IT – статьи от экспертов раз в неделю у вас в почте. Укажите свою дату рождения и мы не забудем поздравить вас.
1.3.6 Packet Tracer – Configure SSH (Instructions Answer)
1.3.6 Packet Tracer – Configure SSH (Instructor Version)
Addressing Table
Device | Interface | IP Address | Subnet Mask |
---|---|---|---|
S1 | VLAN 1 | 10.10.10.2 | 255.255.255.0 |
PC1 | NIC | 10.10.10.10 | 255.255.255.0 |
Objectives
- Part 1: Secure Passwords
- Part 2: Encrypt Communications
- Part 3: Verify SSH Implementation
Background
SSH should replace Telnet for management connections. Telnet uses insecure plain text communications. SSH provides security for remote connections by providing strong encryption of all transmitted data between devices. In this activity, you will secure a remote switch with password encryption and SSH.
Instructions
Part 1: Secure Passwords
a. Using the command prompt on PC1, Telnet to S1. The user EXEC and privileged EXEC password is cisco.
b. Save the current configuration so that any mistakes you might make can be reversed by toggling the power for S1.
c. Show the current configuration and note that the passwords are in plain text. Enter the command that encrypts plain text passwords:
d. Verify that the passwords are encrypted.
Part 2: Encrypt Communications
Step 1: Set the IP domain name and generate secure keys.
It is generally not safe to use Telnet, because data is transferred in plain text. Therefore, use SSH whenever it is available.
a. Configure the domain name to be netacad.pka.
b. Secure keys are needed to encrypt the data. Generate the RSA keys using a 1024 key length.
Step 2: Create an SSH user and reconfigure the VTY lines for SSH-only access.
a. Create an administrator user with cisco as the secret password.
b. Configure the VTY lines to check the local username database for login credentials and to only allow SSH for remote access. Remove the existing vty line password.
Step 3: Verify SSH Implementation
a. Exit the Telnet session and attempt to log back in using Telnet. The attempt should fail.
b. Attempt to log in using SSH. Type ssh and press Enter without any parameters to reveal the command usage instructions. Hint: The -l option is the letter “L”, not the number 1.
c. Upon successful login, enter privileged EXEC mode and save the configuration. If you were unable to successfully access S1, toggle the power and begin again at Part 1.
How to Configure SSH in Cisco Packet Tracer
SSH (Secure Shell) provides secure management of network devices. By using SSH, you establish a secure connection to a network device that you access, and your data is sent in encrypted form.
How to Enable SSH in Cisco Router with Packet Tracer
SSH is a much safer protocol than the Telnet protocol and uses the TCP 22 port by default. The port number may vary.
There are 2 versions of the SSH protocol. These; Version 1 and Version 2.
SSH V1 exploits several patented encryption algorithms and is vulnerable to a well-known vulnerability that could allow an attacker to enter data into the communication flow.
SSH V2, this release has an advanced key exchange algorithm that is not vulnerable to the same abuse and includes more powerful and comprehensive features:
• Encryption such as 3DES and AES.
• Use voice encryption Message Verification Code (MAC) algorithms for integrity checking.
• Support for public-key certificates.
We recommend that you use SSH V2 as far as possible to remotely manage network devices.
To enable SSH in the real scenario, make sure that the file name of your Cisco IOS software is k9 (crypto).
Step 1
First, run Packet Tracer and then create a network topology as shown in the image below. Add an additional Router to the workspace, because after configuration we will connect the Router to the Router with SSH.
Step 2
Open the CLI prompt by clicking on the SYSNETTECH Router and press Enter to skip the initial configuration.
Step 3
To enable SSH on the router, perform the following commands in order.
Step 4
Configure the IP settings of PC1 as follows.
Step 5
To quickly configure the R1’s interface, double-click on it, click the Config tab in the window that opens, and then configure the Port Status option of the GigabitEthernet0/0 interface to On, then assign the IP address.
Step 6
To test whether SSH is running, open the PC1 prompt and establish a connection using the command below.
Step 7
Enter the user name and password you created, and as soon as you press Enter, the connection will be established as in the image below.
Step 8
After executing the show ssh command on PC1 Command Prompt, you can check the version of the SSH protocol that is linked.
Step 9
In this step, execute the following command to make SSH from router to router.
Step 10
In the same way, enter the user account information you created on the Cisco Router and press Enter.
Step 11
As you can see in the image below, a successful SSH connection is made.
Show Commands
Video
With the simulator, you can watch the video below to enable SSH on the router and connect from the PC and also subscribe to our YouTube channel to support us!
Final Word
In this article, after examining how to enable SSH, we have connected with SSH from PC to Router and Router to Router to verify the connection. In the real scenario, to configure SSH on Routers, make sure the IOS image has k9 (crypto). Thanks for following us!
Configuration of SSH on Cisco Switch in Packet Tracer
Configuration of SSH on Cisco Switch in Packet Tracer
This Article is about the configuration of SSH on Cisco Switch. You can configure SSH on Cisco devices very easily using these simple steps:
Check out the some best Switches with fast network speed .
- Crate a Packet Tracer Topology Lab
- Basic IP Setting for connectivity
- Set hostname and domain-name on Switch
- Set console and enable password for SSH login
- Generate the RSA Keys
- Setup the Line VTY configurations
- Create the username password for SSH access from PC
- Verify SSH access
For the configurations of SSH in packet tracer on Cisco switch, you are required to follow the above steps. Let start and perform these steps one by one. (Learn what is PSSH)
Crate a Packet Tracer Topology Lab
Our first step is to open the packet tracer and need to create a simple lab. For this topology we will use only one switch and a PC. Simply drag these two items on dashboard. Now we will connect them with straight through connection.
Basic IP Setting for connectivity
The next step is assign the suitable IP setting to these devices. For keeping it simple and making basic connectivity we will assign just two IP address to these device. We will assign the IP address to PC. For this will open the PC setting and then IP configuration. Here we will assign an IP address to host, in our case we are going to assign it 192.168.1.1 with the default gateway. For default gateway we will assign the IP address 192.168.1.10. We assign the second IP address to our Vlan1 interface on switch. And its IP address will be the gateway of host that is 192.168.1.10. For this we will use the basic commands.
Switch> enable
Switch# config t
Switch(config)#interface vlan 1
Switch (config-if)# ip address 192.168.1.10 255.255.255.0
Switch (config -if)#no shut
Once you done with basic IP setting, you can verify the connectivity by pinging the interface vlan1 IP from host.
Set host-name and domain-name on Switch
For SSh configurations you need to configure a host-name and domain-name for your switch you can do this with these simple commands.
Switch # config t
Switch (config)#hostname SW1
SW1 ( config)#ip domain-name w7cloud.com
Set console and enable password for SSH login
For SSH access it is required that you must configure the console and enable password on your cisco switch. You can set these two passwords with following commands.
SW1 ( config)#line console 0
SW1(config-line)#password cisco
SW1(config -line)#logging synchronous
SW1(config- line)#login local
SW1 (config- line)#exit
SW1 # enable secret cisco
Generate the RSA Keys
Your Cisco switch must have RSA keys that for the SSH process. You can generate the RSA keys with following command:
SW1 ( config)# crypto key generate rsa
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]
Set the size of key to 1024 bits.
If your Cisco Switch is running an older version of Cisco IOS image, then it is extremely recommended that you upgrade to latest Cisco IOS.
Setup the Line VTY configurations
For the configuration of SSH on cisco switch you need the following line vty configurations, and input transport is required to set to SSH. Set the login-to-local, & password to 7.
sw1 ( config)#line vty 0 4
sw1 ( config-line)#transport input ssh
sw1( config -line)#login local
sw1(config- line)#password 7
sw1(config- line ) #exit
Create the username password for SSH access from PC
If you do not have a username for SSH access you need to create a username. You can do it with this simple command:
Sw1# config t
sw1 (config ) # username w7cloud password cisco
Make sure the password encryption services is enabled on your switch, this service will encrypt your password, & when you do “sh run”, you’ll see only the encrypted password, not clear text password.
SW1# service password-encryption
Verify SSH access from Host
Once you done with the above configurations you can test all these configuration by creating a SSH connection from Host. You do it the command ssh –l . Open the host command prompt and use the command
C:\>ssh -l waqas 192.168.1.10
It will ask for password, provide the password that you created with this username in previous steps. Then it asked for console password and then you need to provide the enable password. Now you are in your Cisco switch. You can perform switch configurations from your host.
From the switch, if you use the command ‘sh ip ssh’, it will also confirm that SSH is enabled on this cisco swith.
For better understanding please watch the video and like it.
I hope this will be a helpful for you, please share your comments. If you like this then share this on social media. Thank you for reading this.