Multiple SSH from same host - too many auth failures

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have multiple websites hosted with the same provider. This means that access via SSH is the same 'host' for all.



I have been adding a version of the following to my SSH config file for each site:



Host shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


I now have 6 sites in my config and am unable to connect to SSH via terminal.



I am getting the following error:




Received disconnect from [IP ADDRESS] port 22:2: Too many
authentication failures for [USER]




I have been doing some research and wonder if this has something to do with MaxAuthTries?



If I remove 1 or more of the items from the config file, I can then log on via SSH on terminal.



All of these websites are on a shared hosting platform, if that makes any difference.







share|improve this question



















  • are you using ControlMaster to bundle duplicate connections over the first one?
    – thrig
    Jun 21 at 20:34










  • @thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
    – ccdavies
    Jun 21 at 20:40














up vote
0
down vote

favorite












I have multiple websites hosted with the same provider. This means that access via SSH is the same 'host' for all.



I have been adding a version of the following to my SSH config file for each site:



Host shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


I now have 6 sites in my config and am unable to connect to SSH via terminal.



I am getting the following error:




Received disconnect from [IP ADDRESS] port 22:2: Too many
authentication failures for [USER]




I have been doing some research and wonder if this has something to do with MaxAuthTries?



If I remove 1 or more of the items from the config file, I can then log on via SSH on terminal.



All of these websites are on a shared hosting platform, if that makes any difference.







share|improve this question



















  • are you using ControlMaster to bundle duplicate connections over the first one?
    – thrig
    Jun 21 at 20:34










  • @thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
    – ccdavies
    Jun 21 at 20:40












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have multiple websites hosted with the same provider. This means that access via SSH is the same 'host' for all.



I have been adding a version of the following to my SSH config file for each site:



Host shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


I now have 6 sites in my config and am unable to connect to SSH via terminal.



I am getting the following error:




Received disconnect from [IP ADDRESS] port 22:2: Too many
authentication failures for [USER]




I have been doing some research and wonder if this has something to do with MaxAuthTries?



If I remove 1 or more of the items from the config file, I can then log on via SSH on terminal.



All of these websites are on a shared hosting platform, if that makes any difference.







share|improve this question











I have multiple websites hosted with the same provider. This means that access via SSH is the same 'host' for all.



I have been adding a version of the following to my SSH config file for each site:



Host shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


I now have 6 sites in my config and am unable to connect to SSH via terminal.



I am getting the following error:




Received disconnect from [IP ADDRESS] port 22:2: Too many
authentication failures for [USER]




I have been doing some research and wonder if this has something to do with MaxAuthTries?



If I remove 1 or more of the items from the config file, I can then log on via SSH on terminal.



All of these websites are on a shared hosting platform, if that makes any difference.









share|improve this question










share|improve this question




share|improve this question









asked Jun 21 at 20:23









ccdavies

1846




1846











  • are you using ControlMaster to bundle duplicate connections over the first one?
    – thrig
    Jun 21 at 20:34










  • @thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
    – ccdavies
    Jun 21 at 20:40
















  • are you using ControlMaster to bundle duplicate connections over the first one?
    – thrig
    Jun 21 at 20:34










  • @thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
    – ccdavies
    Jun 21 at 20:40















are you using ControlMaster to bundle duplicate connections over the first one?
– thrig
Jun 21 at 20:34




are you using ControlMaster to bundle duplicate connections over the first one?
– thrig
Jun 21 at 20:34












@thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
– ccdavies
Jun 21 at 20:40




@thrig No. I'm pretty new to SSH. I'm learning, but its a rather steep learning curve. Any guidance would be appreciated.
– ccdavies
Jun 21 at 20:40










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










You're on the right track, but I think you might benefit from breaking out the configuration with aliases for each user within your ~/.ssh/config:



Host site1
HostName shell.grid.co.uk
User site1user
IdentityFile ~/.ssh/id_rsa_site1user

Host site2
HostName shell.grid.co.uk
User site2user
IdentityFile ~/.ssh/id_rsa_site2user

Host sitetest
HostName shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


This way your SSH client should only use the one specific key for each user. You would simply ssh site1 and your configuration would add the correct username and private key.






share|improve this answer





















  • Thank you! That has worked. I will read up on the use of 'host'.
    – ccdavies
    Jun 21 at 21:23










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451191%2fmultiple-ssh-from-same-host-too-many-auth-failures%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










You're on the right track, but I think you might benefit from breaking out the configuration with aliases for each user within your ~/.ssh/config:



Host site1
HostName shell.grid.co.uk
User site1user
IdentityFile ~/.ssh/id_rsa_site1user

Host site2
HostName shell.grid.co.uk
User site2user
IdentityFile ~/.ssh/id_rsa_site2user

Host sitetest
HostName shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


This way your SSH client should only use the one specific key for each user. You would simply ssh site1 and your configuration would add the correct username and private key.






share|improve this answer





















  • Thank you! That has worked. I will read up on the use of 'host'.
    – ccdavies
    Jun 21 at 21:23














up vote
1
down vote



accepted










You're on the right track, but I think you might benefit from breaking out the configuration with aliases for each user within your ~/.ssh/config:



Host site1
HostName shell.grid.co.uk
User site1user
IdentityFile ~/.ssh/id_rsa_site1user

Host site2
HostName shell.grid.co.uk
User site2user
IdentityFile ~/.ssh/id_rsa_site2user

Host sitetest
HostName shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


This way your SSH client should only use the one specific key for each user. You would simply ssh site1 and your configuration would add the correct username and private key.






share|improve this answer





















  • Thank you! That has worked. I will read up on the use of 'host'.
    – ccdavies
    Jun 21 at 21:23












up vote
1
down vote



accepted







up vote
1
down vote



accepted






You're on the right track, but I think you might benefit from breaking out the configuration with aliases for each user within your ~/.ssh/config:



Host site1
HostName shell.grid.co.uk
User site1user
IdentityFile ~/.ssh/id_rsa_site1user

Host site2
HostName shell.grid.co.uk
User site2user
IdentityFile ~/.ssh/id_rsa_site2user

Host sitetest
HostName shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


This way your SSH client should only use the one specific key for each user. You would simply ssh site1 and your configuration would add the correct username and private key.






share|improve this answer













You're on the right track, but I think you might benefit from breaking out the configuration with aliases for each user within your ~/.ssh/config:



Host site1
HostName shell.grid.co.uk
User site1user
IdentityFile ~/.ssh/id_rsa_site1user

Host site2
HostName shell.grid.co.uk
User site2user
IdentityFile ~/.ssh/id_rsa_site2user

Host sitetest
HostName shell.grid.co.uk
User testuser
IdentityFile ~/.ssh/id_rsa_testuser


This way your SSH client should only use the one specific key for each user. You would simply ssh site1 and your configuration would add the correct username and private key.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 21 at 20:49









DopeGhoti

39.7k54779




39.7k54779











  • Thank you! That has worked. I will read up on the use of 'host'.
    – ccdavies
    Jun 21 at 21:23
















  • Thank you! That has worked. I will read up on the use of 'host'.
    – ccdavies
    Jun 21 at 21:23















Thank you! That has worked. I will read up on the use of 'host'.
– ccdavies
Jun 21 at 21:23




Thank you! That has worked. I will read up on the use of 'host'.
– ccdavies
Jun 21 at 21:23












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451191%2fmultiple-ssh-from-same-host-too-many-auth-failures%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay