Noob SSH Question

Hi all...bit of a noob question here. I'm trying to SSH into my Linksys WRT1900ACS using Cmder. Followed the instructions on here, but it returns a warning message that Host Key may have been changed and verification failed. Confirmed my router IP is correct and I'm able to login through Luci. Just upgraded from 19.07.2 to 19.07.6.

I'm trying to copy and paste the script to reorder firewall rules and apply time restrictions. Appreciate the help!

Probably harmless. Perhaps the host key got regenerated. Just clear the entry in your ~/.ssh/known_hosts or whatever cmder uses for that.

3 Likes

That is normal as the upgrade would have recreated the host keys on the router.
just remove the key on your local machine and accept the new key on next connection.

1 Like

Thanks @darksky and @faser

Went into regedit to clear the host key, but can't find where it is. Thoughts?

Well I don't know cmder but from what I read it might be within the cmder environment and then in ~/.ssh/known_hosts.

1 Like

This is the part of the message listing location. Just can't figure out how to fix the problem.

Offending RSA key in C:\Users\Jared1/.ssh/known_hosts:1

Open that file up with a text editor, find the line that corresponds to your router (either hostname or IP address) and remove it. Looking at Cmder it's possible that it might be a container thing, try searching your file system for the known_hosts file.

If it's an actual terminal emulator, try using find/vi/nano to edit the file from within this environment.

1 Like

If this is the only host you connect with SSH on that PC, just erase the file.

erase c:\Users\Jared1\.ssh\known_hosts

3 Likes

Thanks everyone for the quick response. I deleted the known_host files as suggested and was able to log in.

Really appreciate all the knowledgeable folks in the OpenWRT community! It's a big help for us non-technical peeps. I'll mark this as solved!

FYI, you would not need to use cmder anymore to connect to openwrt. SSH is now part of Win10.

5 Likes

That's great. Can't wait for the day I can use the phrase GNU/Windows in an unironic context.

1 Like

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.