Cannot connect to OpenWRT router using SSH after OpenWRT firmware upgrade

OpenWRT is a very powerful router firmware. Since I wanted to upgrade the router firmware, I took a backup of the configuration and then did a complete erase of the configuration settings at the time of firmware upgrade. After logging in, and setting up SSH as a means to log in to the router, SSH was not able to connect to the router.

This was due to SSH key mismatch between the newly installed firmware and the SSH key stored ~/.ssh/known_hosts file on the computer. Due to this, the computer was not able to receive the new SSH key from the router.

To fix, do the following in a linux terminal:
$ ssh-keygen -f "~/.ssh/known_hosts" -R <router_ip_address> <enter>
where <router_ip_address> is the IP address of the router.

After accepting the key, the issue was resolved.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s