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.