How to enable SSH on cisco
switch/router + basic vlan configuration.
switch12#conf
t
Enter configuration commands, one per line. End with CNTL/Z.
switch12(config)#username svnet password ******
switch12(config)#username svnet pri 15
switch12(config)#line vty 0 4
switch12(config-line)#transport input all
switch12(config-line)#login local
switch12(config-line)#exit
switch12(config)#int vlan 1
switch12(config-if)#ip add 192.168.0.228 255.255.255.0
switch12(config-if)#no shut
switch12(config-if)#exit
switch12(config)#int ran fa0/1 - 15
switch12(config-if-range)#switchport mode access
switch12(config-if-range)#switchport access vlan 1
switch12(config-if-range)#no shut
switch12(config-if-range)#exit
switch12(config)#hostname switch12
switch12(config)#ip domain-name svnetworks.com
switch12(config)#crypto key generate rsa
% You already have RSA keys defined named switch12.townsendnetworks.com.
% Do you really want to replace them? [yes/no]: yes
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.
Enter configuration commands, one per line. End with CNTL/Z.
switch12(config)#username svnet password ******
switch12(config)#username svnet pri 15
switch12(config)#line vty 0 4
switch12(config-line)#transport input all
switch12(config-line)#login local
switch12(config-line)#exit
switch12(config)#int vlan 1
switch12(config-if)#ip add 192.168.0.228 255.255.255.0
switch12(config-if)#no shut
switch12(config-if)#exit
switch12(config)#int ran fa0/1 - 15
switch12(config-if-range)#switchport mode access
switch12(config-if-range)#switchport access vlan 1
switch12(config-if-range)#no shut
switch12(config-if-range)#exit
switch12(config)#hostname switch12
switch12(config)#ip domain-name svnetworks.com
switch12(config)#crypto key generate rsa
% You already have RSA keys defined named switch12.townsendnetworks.com.
% Do you really want to replace them? [yes/no]: yes
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
[512]: 1
*Mar 1 00:55:33.766: %SSH-5-DISABLED: SSH 1.99 has been disabled024
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 5 seconds)
*Mar 1 00:55:33.766: %SSH-5-DISABLED: SSH 1.99 has been disabled024
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 5 seconds)
switch12(config)#
*Mar 1 00:55:41.115: %SSH-5-ENABLED: SSH 1.99 has been enabled
*Mar 1 00:55:41.115: %SSH-5-ENABLED: SSH 1.99 has been enabled
switch12#show ssh
Connection Version Mode Encryption Hmac State Username
0 2.0 IN 3des-cbc hmac-sha1 Session started svnet
0 2.0 OUT 3des-cbc hmac-sha1 Session started svnet
%No SSHv1 server connections running.
switch12#
Connection Version Mode Encryption Hmac State Username
0 2.0 IN 3des-cbc hmac-sha1 Session started svnet
0 2.0 OUT 3des-cbc hmac-sha1 Session started svnet
%No SSHv1 server connections running.
switch12#
No comments:
Post a Comment