Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Cisco device configuration SSH login

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

A trial topology

Two Server configuration

① configure hostname and domain name

Because the secret key of rsa is generated with hostname and domain name

Router (config) # host Server

Server (config) # ip domain name test.com

② generates RSA key

When the rsa key is generated, the ssh service is automatically turned on, otherwise it is automatically closed.

To delete the RSA key pair, use the crypto key zeroize rsa global configuration mode command. After the RSA key pair is deleted, the SSH server will automatically disable

Server (config) # crypto key generate rsa

The name for the keys will be: Server.test.com

Choose the size of the key modulus in the range of 360 to 4096 for your

General Purpose Keys. Choosing a key modulus greater than 512 may take

A few minutes.

How many bits in the modulus: 2048 / / set the key length

% Generating 2048 bit RSA keys, keys will be non-exportable...

[OK] (elapsed time was 7 seconds)

Server (config) #

* May 209 has been enabled 50: 12.583:% SSH-5-ENABLED: SSH 1.99 has been enabled / / ssh automatically opens

③ configure username and password

Server (config) # username admin privilege 0 secret cisco / / if privilege is not 0, it automatically enters privileged mode when ssh (that is, no enable command or enable password is required)

④ configure enable password

Server (config) # enable secret cisco

⑤ configuration vty

Server (config) # line vty 0 4

Server (config-line) # exec-timeout 100

Server (config-line) # logging synchronous

Server (config-line) # login local

Server (config-line) # transport input ssh

Other settings for ⑥ ssh

Server (config) # ip ssh time-out 120 / / ssh timeout

Server (config) # ip ssh authentication-retries 2 / / number of ssh authentication failures

Server (config) # ip ssh version 2 / / ssh version

Server (config) # ip ssh source-interface fastEthernet 0ram 0 / / specified interface if there is vlan, other interfaces on the device cannot be ssh after the specified interface

Three test login

Note: using the ssh command on a cisco device requires specifying a user (if username is not configured locally)

Client#ssh-l admin 12.1.1.2 Passwor

Password:

Server > en

Password:

Server#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Server (config) # end

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report