SSH error: Too many authentic authentication failures


This error occurs, when there are multiple known hosts and ssh command is unable to capture private key for specific host.

Solution:
You have to specify host and private ssh key in ~/.ssh/config file as shown below:

You can tell your SSH client which keys to use for which host. Change your ~/.ssh/config file like this:

Host *
    IdentitiesOnly yes

Host github.com github 
    User your-user
    Hostname github.com
    RSAAuthentication yes
    Compression yes
    IdentityFile ~/.ssh/your-user.key

Host domainname.com WhatEverNameYouWant
    User taimoor
    Hostname domainname.com
    RSAAuthentication yes
    Compression yes
    IdentityFile ~/.ssh/amazon_ssh_key_name.pem
    IdentitiesOnly yes
    Port 22

#In case of IP address

Host 57.29.601.462 whateverNameYouWant
    User you-user-name-whateverYouWant
    Hostname 57.29.601.462
    RSAAuthentication yes
    Compression yes
    IdentityFile ~/.ssh/ssh_private_key_file_name
    IdentitiesOnly yes
    Port 22


Reference:
makandra cards

Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Tagged with:
Posted in amazon, bitbucket, Github, ssh

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: