I am an avid fan of using HostGator for small business WordPress website hosting. I love that they use a standard CPanel installation and I can get SSH access, it’s quick and easy – a diet VPS/dedicated server if you will.
I have been having an issue I’ve never seen before, when attempting to connect, e.g.:
ssh -p 2222 firstname.lastname@example.org
I was receiving the following error:
Received disconnect from 220.127.116.11: 2: Too many authentication failures for username
After a few hours back and forth with support, troubleshooting IP blacklists and user errors, we realized it was key conflict that was troubling things. I temporarily moved these keys out of the
~/.ssh/ directory and I was okay – until I reset them and they were stored in my OS X keychain.
Even moving them or deleting them did nothing. I also want to keep these keys intact because I use them to authenticate with Git and some of my project servers.
By using this flag, I can have the connection disregard public key authentication all together and allow me to go straight to user/pass login. The final command:
ssh -p 2222 -o PubkeyAuthentication=no email@example.com
-p 2222 is only required for HostGator in this case, as SSH is restricted to port 2222. Feel free to remove or modify the port flag to your liking – I hope this helps you!