10-11-2022 12:34 AM
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 ?
10-11-2022 12:50 AM
@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
10-11-2022 01:15 AM
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)
10-11-2022 01:01 AM
add ssh command to access <<- you meaning repeat add all SSH command again
if that case
then check key expire.
10-11-2022 01:16 AM
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?
10-11-2022 01:20 AM
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
10-11-2022 01:28 AM
Yes the key is expire and hence you need new key and that why router refuse the SSH connection.
10-11-2022 01:47 AM
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?
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