• Home
Unreal Labs

Unreal Labs

Always learning

Setting up SSH on a Cisco Switch

Aaron · July 10, 2023 · Cisco · Cisco, Cisco ssh, cisco switch security configuration, cisco switch ssh, Cisco switch ssh configuration, Cisco switch vty line configuration, how to config ssh on switch, how to disable telnet on a cisco switch, local account creation on Cisco switch, privlege 15, Secure shell on a Cisco switch, ssh better then telnet, ssh cisco, SSH configuration · No Comments

Connect to the switch: Use a console cable or Telnet to connect to the switch’s command-line interface (CLI). You’ll need the appropriate credentials to access the switch.

The first step is to generate and RSA key pair; enter the global configuration mode by typing ‘configure terminal’ or ‘conf t’. Now lets generate the RSA keypair using the following command ‘crypto key generate rsa’. You will be prompted to specify the key modulus size, I would recommend at least 2048 bits.

Example:

Switch(config)# crypto key generate rsa
The name for the keys will be: switch
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]: 2048

Configure SSH version and authentication: Enter the SSH configuration mode using the ‘ip ssh’ command and specify the desired SSH version (v1,v2 or both) and enable authentication using local usernames and passwords. Also make sure that you have configured at least one “local login” account an example is below.

Switch(config)# username john privilege 15 password mypassword
Switch(config)# ip ssh version 2
Switch(config)# ip ssh authentication-retries 3
Switch(config)# ip ssh time-out 60

Now we can configure the VTY lines for SSH, in the global configuration mode, access the line configuration mode for the VTY lines using the ‘line vty’ command. Set the transport input to SSH and specify the SSH authentication method.

Switch(config)# line vty 0 15
Switch(config-line)# transport input ssh
Switch(config-line)# login local

Save your configuration using the ‘write’ or ‘copy running-config startup-config’ command to save the configuration changes.

Switch(config)# write / Or wr or copy running-config startup-config

You have completed the steps, SSH should be enabled on your Cisco switch. You can now try and connect to the switch using an SSH client, like Putty or OpenSSH.

Thanks again for visiting Unreal-Labs, You can also check out the Unreal-Labs youtube channel for a video demonstration of this configuration.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
Like Loading...

Related

Leave a comment Cancel reply

Name and email address are required. Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

  •  Where is Wazuh Data Stored?
  • Using an ACL to Control Access to a Cisco Switch. 

Categories

Topics

Cisco CMD Fortinet Interwebs linux mac Microsoft robocopy Scripting ShoreTel/Mitel Study Guide Uncategorized VoIP Wazuh Wireshark

Archives

Enter your email address to follow this blog and receive notifications of new posts by email.

Flickr Photos

O'Side Buccaneer Beach 5Dii 8X15mmNeuenburger Urwald im WinterCastle StalkerHooded Merganser
More Photos
Back To Top

Website Powered by WordPress.com.

  • Comment
  • Reblog
  • Subscribe Subscribed
    • Unreal Labs
    • Already have a WordPress.com account? Log in now.
    • Unreal Labs
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d