cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1646
Views
0
Helpful
21
Replies

Can not configure SSH on Cisco 2960

aelharam
Level 1
Level 1

Hi there,

Im having issues setting up ssh on my cisco 2960. 

Can anyone help.

Many Thanks

Abdo

21 Replies 21

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

Not all the IOS for 2960 are able to support SSH, the IOS must be K9 in order to support SSH. Now the configuration should be

conf t

ip domain name mydomain.com
hostname SWITH01
ip ssh ver 2
ip ssh authentication 3
ip ssh time 120

crypto key generate rsa (press enter)

type: 1024 (at least and press enter again)

line vty 0 15
transport input ssh
login local   <--- if you are going to use local credentials you need to disable aaa new-model prepending 'no')

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hi There,

I tried that, but how do i know what IP address to use when i want to initiate an ssh Session ?

Thanks

Hi

It must be the management vlan, imagine the vlan 100 is your management vlan, so you should have:

vlan 100
name MANAGEMENT

interface vlan 100
name MANAGEMENT
ip address 192.168.100.50 255.255.255.0
no shutdown

ip default-gateway 192.168.100.1  <-- it is the default gateway for the network associated to the vlan 100, this IP .1 is created on a layer 3 device.

now in order to enable the SVI (interface vlan) you can:

- Assign the vlan to an access port (not recommended for the management vlan)
or
- Allow the vlan under a trunk, by default the trunk interfaces pass all the vlans created locally on the switch.

so you you could have:

interface fastethernet 0/48
description TO-DISTRIBUTION-SWITCH
switchport mode trunk   (passing all the vlans by default)
no shutdown

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hi Julio,

I tried that but please see attached and tell me what i did wrong.

Hi

You are getting an overlapping error message, it means you cannot configure 2  IP addresses of the same network on 2 different interfaces at the same device.

The IP address (172.28.15.20) you are configuring on the interface vlan 10 belongs to the same network (172.28.15.0/24) like the IP on the interface vlan 5. 

Also you will not able to reach the device is the configured default-gateway IP is not the default gateway for the IP of the management vlan. You can keep only 1 ip default-gateway IP on the switches. 

vlan 100

int vlan 100
ip address 172.28.15.20 255.255.255.0

ip default-gateway 172.28.15.254

Note: If you are connected remotely to the switch and you change the default-gateway you will lost connectivity to the switch. 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

So how can i remove that IP address from Vlan 5 and assign that IP to Vlan 10 as it will be used to remote into the switch

Remember the vlans have associated a network each other, so Im not sure if you have 2 networks, 1 for the vlan 5 and other network for the vlan 10. 

Imagine:

Vlan 5 - network associated: 192.168.5.0/24
Vlan 10 - network associated: 192.168.10.0/24

You cannot have this on the same device, it will not be allowed.

interface vlan 5
ip address 192.168.5.20 255.255.255.0

interface vlan 10
ip address 192.168.5.21 255.255.255.0

Because both IP addresses belong to the same network 192.168.5.0/24

The management vlan will be the only vlan with default gateway on the switch. You can have multiple interface vlan on the switch but only 1 can be the management vlan and it will be the associated with the default gateway (ip default-gateway IP address)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

How can i remove the Ip address from Vlan 5 and allow only vlan 10 to have an ip address?

Well there are 2 ways:

interface vlan 5
no ip address x.x.x.x y.y.y.y

or 

no interface vlan 5

But you can left there the interface vlan 5, the important here is the IP address associated to the IP default-gateway 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

So now i have removed the ip address from Vlan 5 and gave vlan 10 (mgnt) 172.28.15.100

Should i now be able to connect to it via ssh using that IP address?

Yes,

are you able to ping the IP 172.28.15.100 from your computer.  If you already have local credentials you should be able to log in remotely otherwise you need to created it:

conf t

no aaa new-model

username cisco privi 15 pass cisco123




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

No but i have another switch which is on 172.28.15.254 and i can ping that please see screenshot.

Ok just a question, what is the default gateway of the network 172.28.15.0/24




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

172.28.15.254