Fixing Too Many Authentication Failures For Username Error with Octopress

Since I have setup an Octopress in my local machine, you can see how I did it here with Mac, and here with Windows. I have deployed to my webhost (HostGator) via Rsync.

I actually just deployed to create a demo video, but because I moved from one host to another, it detects that my public key is used in too many connections, and I got this error message.

Too many authentication failures for username error message
Too many authentication failures for username error message

So basically when I type:

ssh -p 2222 kimiweb6@wphowtosite.com

Received disconnect from IP Address: :2 Too many authentication failures for username

In this case, my username is kimiweb6 and my host is wphowtosite.com

Also typed, ssh -p 2222 -o PubkeyAuthentication=no kimiweb6@192.232.251.95 brought me to the Too many authentication failures for username result.

I could login, but I couldn’t deploy anything.

I have looked and googled for the solution for hours, also contacting my host’s tech contact support, and obviously they didn’t help much, so I finally could fix it.

How I fixed it (with Mac)

So I assumed that you already uploaded your public key to your server. My public key that I uploaded was called, id_dsa.pub

1. Create config.txt file, copy and paste the code below, and saved it on my desktop.

Host www.somehost.com
IdentityFile ~/.ssh/key_for_somehost_rsa
IdentitiesOnly yes
Port 22

I replaced it with my data:

Host wphowtosite.com
IdentityFile ~/.ssh/id_dsa
IdentitiesOnly yes
Port 22

Code is found on this site.

[pdtad]

2. Open Finder, and go to ssh folder, you can click on “Go” → “Go to Folder” on Finder menu.  Or hold your CMD + Shift + G and type ~/.ssh to go to your ssh folder of your computer username.

3. You will see your public keys, they look more and less like this.

SSH folder contains your public keys
SSH folder contains your public keys

4. Drag your config.txt to this folder, and delete the text file extension (.txt)

Click “Remove” button if it asks you “Are you sure you want to remove the extension “.txt””

Remove extension warning
Remove extension warning

Now you can try deploying from your terminal and it was fixed.

Troubleshooting if this method above doesn’t work for you:

1. Add ssh-add -D into your terminal to clean the identities entries.

2. Change from www.yourhost.com to yourhost.com.

I love Octopress for my private blog, but I also like WP, you may check out my opinion about the difference between these two blogging platform. I hope this tip will speed you up if you have the same problem I mentioned above.