07-17-2022 11:42 PM
I'm Using Cisco 3850 switch and was able to log in through SSH with my username earlier, But today I'm getting the error "Connection closed by foreign host". Please help to resolve the issue. I've also tried logging in from another switch but the issue is the same.
07-18-2022 12:49 AM
Hope you have configured line VTY 0 4
them put blow commands,
line vty 0 4
password kics
login local
07-18-2022 02:19 AM
As I mentioned above, Earlier I was able to log in through SSH. Configuration changes are not made since then.
07-18-2022 01:35 AM
- Check switch logs through telnet or (direct connected) console , when this happens.
M.
07-18-2022 01:39 AM
Hello,
what do you have configured on the target switch ? Make sure it looks something like this:
ip domain-name mydomain.com
username admin privilege 15 password cisco
line vty 0 4
transport input ssh
login local
You also might want to try and zeroize, the regenerate the crypto key:
crypto key zeroize
crypto key generate rsa
07-18-2022 02:21 AM
Please see the configuration below :-
crypto key generate rsa
1024
ip ssh version 2
line vty 0 15
no password cisco
transport input ssh
exit
ip ssh authentication-retries 5
ip ssh time-out 90
line vty 0 4
login local
transport input ssh
line vty 5 15
login
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