Search code examples
mysqlamazon-web-servicesamazon-elastic-beanstalkmysql-workbenchamazon-rds

How to fix erroneous MySQL Workbench SSH error after AWS cycled Elastic Beanstalk IP address breaking connection to RDS


How do we clear the erroneous SSH error? After fixing yet another AWS IP change to a stable EB instance which really irritates, we are yet again seeing "Could not connect SSH Tunnel WARNING: Server public key has changed". The thing is, the server public key didn't change. Seems like last time we edited the workbench connection and clicked clear on the passwords, then we deleted the known_host file from .ssh folder, and we deleted the server_instances.xml file, and then when we restarted workbench and it prompted us for our passwords again and we were sailing. But this time, we are just getting the same error over and over again. Can anyone suggest an additional step I might be missing?


Solution

  • Your issue may vary, but here's one thing to check: In the workbench, outside of your connection configuration, select Edit -> Preferences -> SSH -> and check the value of "Path to SSH known hosts file:" and verify that you are updating the correct file in the step above: "then we deleted the known_host file from .ssh folder". In our case, we were editing the correct folder for the instructions from Workbench, however, our actual setup was pointing to a different folder and we didn't know it. We then deleted the files in THAT other folder and everything worked! Still miffed at AWS for mucking up EB in the first place. Hope this helps!