cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4179
Views
0
Helpful
5
Replies

Connection closed by foreign host

gauravdeshmukh
Level 1
Level 1

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.

5 Replies 5

Jitendra Kumar
Spotlight
Spotlight

Hope you have configured line VTY 0 4

them put blow commands,

line vty 0 4

password kics

login local

 

 

Thanks,
Jitendra

As I mentioned above, Earlier I was able to log in through SSH. Configuration changes are not made since then.

marce1000
VIP
VIP

 

  - Check switch logs through telnet or (direct connected) console , when this happens.

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

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

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

Review Cisco Networking for a $25 gift card