cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
406
Views
0
Helpful
12
Replies

Installed Switch C2900 - SSH connects but doesn't let me log on

RG78874
Level 1
Level 1

I have a Switch that I configured using the console cable. I have now added the Switch to another Switch and configured an uplink. I have gone to the remote desktop and created a putty ssh session to the Switch successfully.

Then I am prompted with username and password, I haven't set a local username or password.

I have set the Switch to have an enable password.

 

 

enable secret 0 password123

no aaa new-model

line con 0 stopbits 1
line vty 0 4
login
transport input ssh
line vty 5 15
login
transport input ssh

 

 

I'm not sure how to get this right or what the settings are for this situation, do i need to put login local?

I will then look to connect the Switch to ISE using tacacs+. But for now I need to configure how to login to the Switch with local username and password.

I did try add a local username and password, and I did copy run start. Reload. I didn't see this in the running configuration. So i'm not sure where it has gone wrong.

Unfortunately I cannot take the whole out, I have no access to remove the config from my laptop.

2 Accepted Solutions

Accepted Solutions

i added aaa-new model command, added credentials in then regenerate ssh key key and it started to work. That was it.

View solution in original post

That what I told you when you asked me to read your question.  You should not accept your own answer as correct.

 

FlavioMiranda_0-1730553552037.png

 

View solution in original post

12 Replies 12

@RG78874 hi you need to have username and password if you are planning to use SSH. try below guide

https://securitywithblue.medium.com/ssh-configuration-on-cisco-switch-f138535391eb

Please rate this and mark as solution/answer, if this resolved your issue
Good luck
KB

Thanks, I'm going to review the link you sent me.

@RG78874 

 You need these steps.

aaa new-model

username <username> password <password>

ip domain-name <domain.com>

crypto key generate rsa

Use 2048 key size

 

I've done this, because I have ssh connectivity.

what is the problem then?

Read what I have written in the question!

I get SSH access but I am prompted for a username / password that I haven't created. Do I need to change anything with my SSH config to make this work.

Read what I answered. You need to creste username and password and use it

No you dont. You dont have aaa new-model

We can see from the config you shared

balaji.bandi
Hall of Fame
Hall of Fame
I did try add a local username and password, and I did copy run start. Reload. I didn't see this in the running configuration. So i'm not sure where it has gone wrong.

If that not shown in the config, so you not able to login since there is no username available.

Do you have console access - then check show run | in username

if not create another username with priv 15 to access the switch using SSH.

as exmple config SSH and username :

https://www.balajibandi.com/?p=1412

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

i added aaa-new model command, added credentials in then regenerate ssh key key and it started to work. That was it.

That what I told you when you asked me to read your question.  You should not accept your own answer as correct.

 

FlavioMiranda_0-1730553552037.png

 

RG78874
Level 1
Level 1

Corrected, it's the way you come across when you read your reply. I've marked your reply as the answer. Hopefully you can be happy with that now.

Review Cisco Networking for a $25 gift card