08-19-2020 07:56 AM
Hi all,
I'm currently trying to get ssh working on my Cisco router. I've followed every ssh configuration guide I could find but nothing seems to work. I run:
// sets ssh (config)#line vty 0 4 // requires password using locally defined credentials (config-line)#login local // sets inactivity timer to 3 minutes (config-line)#exec-timeout 3 // deifnes a group of lines (config-line)#rotary 1 // sets ssh instead of telnet (config-line)#transport input ssh // generates ssh keys (choose 2048 bits) (config)#crypto key generate rsa // sets ssh version (config)#ip ssh version 2 // changes port for ssh (config)#ip ssh port 2222 rotary 1
However, whenever I try to ssh into the router it just throws the error "Network is unreachable." I can ping the router, was able to telnet into the switch before, SSH onto other devices on my LAN, and login to console with login local so I know all of that isn't the issue.
I Nmap'd the router and found that port 2222 wasn't open. In my testing, I discovered that for some reason when I set the port to anything not ending in **00 the port isn't open. However, when I set it to 9000, 9900, 10000, etc. it does work.
Here's my lines:
Router#show line Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int * 0 CTY - - - - - 0 0 0/0 - 1 TTY - inout - - - 0 0 0/0 - 5 AUX 9600/9600 - - - - - 0 0 0/0 - 6 VTY - - 1 - - 0 0 0/0 - 7 VTY - - 1 - - 0 0 0/0 - 8 VTY - - 1 - - 4 0 0/0 - 9 VTY - - 1 - - 0 0 0/0 - 10 VTY - - 1 - - 0 0 0/0 - Line(s) not in async mode -or- with no hardware support: 2-4
I'm just not sure what else could be the issue so I won't provide any other config, but I'd be more than happy to provide other config.
Thanks in advance, Arthur
08-19-2020 08:05 AM - edited 08-19-2020 08:07 AM
Can you postbelow output along with VTY and (any ACL in place ?)
#show tcp vty 0
Try below :
ip ssh port 2222 rotary 1
!
line vty 0 15
rotary 1
08-19-2020 09:42 AM
Hi Balaji,
When I run #show tcp vty 0 (or any other vty lines) there is no output, just a blank line.
When I run the code you gave it just has the same effect of the "network unreachable" error. However the port does appear open.
Thanks, Arthur
08-22-2020 01:47 PM
Arthur
Would you post the output of the command show ip 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