cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1203
Views
5
Helpful
7
Replies

Cisco router refused SSH conenction

Ahmed Tarek
Level 3
Level 3

Hello Experts

my question is a little different, i used to use SSH connection to access router with normal behavior, but yesterday i can`t login usually by ssh connection and i get error message (Router refused connection ) so i access by telnet and add ssh command to access , then i can use ssh connection again.

my question is why ssh command disappear ? what happen ?

7 Replies 7

anboom
Cisco Employee
Cisco Employee

@Ahmed Tarek thanks for posting your question on SSH.

Can you provide the configuration you are typing, what device this is and the version of IOS please? There are different capabilities for models and IOSs and we will be able to help with more info.

Check out this post, too: Solved: Re: SSH Connection Refused - Page 2 - Cisco Community

Hope this helps you with the issue! anboom

Hello @anboom

thanks for reply , i added SSH comand as below

crypto key generate rsa , then type 1024

ISR model ( Cisco C1117-4P Chassis )

Version (Version 16.9.2)

add ssh command to access <<- you meaning repeat add all SSH command again 
if that case 
then check key expire.

When you accessed the router by telnet (when ssh was not working) did you by any chance use the command show ip ssh? If so what was the output?

It would be helpful if we knew exactly what commands you used to get ssh to work. In particular did you need to generate the RSA key for SSH. There are some things that can cause the RSA key to become invalid, such as changing the device name or the domain name. Have there been any changes like that on this router?

HTH

Rick

thanks all for your support, i really appreciated

- i did not change any setting or configuration for router

- i used this command to reactivate (reuse) SSH command : crypto key generate rsa , 1024

Yes the key is expire and hence you need new key and that why router refuse the SSH connection.

thanks @MHM

but why key is expire?

i mean how long key duration by default? 

and how to increase the duration or stop expiration of ssh?

Review Cisco Networking for a $25 gift card