10-19-2024 05:00 AM
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.
Solved! Go to Solution.
11-02-2024 06:03 AM
i added aaa-new model command, added credentials in then regenerate ssh key key and it started to work. That was it.
11-02-2024 06:20 AM - edited 11-02-2024 06:23 AM
That what I told you when you asked me to read your question. You should not accept your own answer as correct.
10-19-2024 05:08 AM
@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
10-19-2024 07:08 AM
Thanks, I'm going to review the link you sent me.
10-19-2024 06:16 AM
You need these steps.
aaa new-model
username <username> password <password>
ip domain-name <domain.com>
crypto key generate rsa
Use 2048 key size
10-19-2024 07:08 AM
I've done this, because I have ssh connectivity.
10-19-2024 08:08 AM
what is the problem then?
10-19-2024 10:05 AM
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.
10-19-2024 10:08 AM - edited 10-19-2024 10:09 AM
Read what I answered. You need to creste username and password and use it
10-19-2024 10:27 AM
No you dont. You dont have aaa new-model
We can see from the config you shared
10-19-2024 10:52 AM
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
11-02-2024 06:03 AM
i added aaa-new model command, added credentials in then regenerate ssh key key and it started to work. That was it.
11-02-2024 06:20 AM - edited 11-02-2024 06:23 AM
That what I told you when you asked me to read your question. You should not accept your own answer as correct.
11-02-2024 07:55 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide