Difference between revisions of "Enabling SSH and disabling telnet to Cisco switch"

From Notes_Wiki
m
m
Line 6: Line 6:
<pre>
<pre>
conf t
conf t
     ip domain-name iiit.ac.in
     ip domain-name sbarjatiya.com
     username iiit password m1d0ubqbp($@$ level 15
     username admin password examplepw level 15
     crypto key generate rsa modulus 2048
     crypto key generate rsa modulus 2048
     line vty 0 15
     line vty 0 15

Revision as of 16:23, 10 March 2019

<yambe:breadcrumb self="Enabling SSH and disabling telnet to Cisco switch">Switch configuration notes|Switch configuration notes</yambe:breadcrumb>

Enabling SSH and disabling telnet to Cisco switch

First one should upgrade to latest crypto IOS available. Crypto IOS files generally have letter 'k' in their names. Then we can enable ssh and disable telnet using:

conf t
    ip domain-name sbarjatiya.com
    username admin password examplepw level 15
    crypto key generate rsa modulus 2048
    line vty 0 15
        login local
        transport protocol ssh OR transport input ssh
    end
    wr
  • To keep both telnet and ssh enabled we can use 'transport protocol ssh telnet' or 'transport input telnet ssh' based on switch model.
  • Domain name is set since switch will try to generate key for '<switch_name>.<domain_name>'

One must verify that things are working properly before terminating current session to switch.

Note: This would also cause http to be disabled. Hence connecting to switch using browser or Cisco Network Assistant would not be possible.


<yambe:breadcrumb self="Enabling SSH and disabling telnet to Cisco switch">Switch configuration notes|Switch configuration notes</yambe:breadcrumb>