CentOS 7. SSH Permission denied. Why no password?

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 a frustrating SSH access problem on a new VM with Centos 7 which is driving me crazy!! It seems to be a first-time login problem on the new box.
I know all the basic settings ... this is about the 5th VM I have set up with this OS (So ifcfg.eth0, hostname, network etc is all good).
I can ping the new box as well ... remotely and from it to other boxes in the network. But ...
When I attempt remote SSH access I just keep getting the error:



Permission denied (publickey,gssapi-keyex,gssapi-with-mic)


I have seen this before and know about /etc/ssh/ssh_config ... and we are just talking password authentication here (not ssh key login). But only on this box I am getting it. I started off with just:



host *
GSSAPIAuthentication yes


This is what I used on the other machines and it always worked!
So, I have since tried uncommenting these keys:



#PasswordAuthentication yes


and



#PermitRootLogin yes


Above because I am logging in with root. And ... I also tried commenting out GSSAPIAuthentication. And yes ... I always restart the sshd daemon after making changes to this file (systemctl restart sshd.services)
Also ... I see nothing significant in /var/log/messages or /var/log/secure .. I've tried verbose using the ssh -v switch and what I do notice on this problem box is that shortly before the above "Permission denied" error is output I get this message:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic


Whereas on other boxes which work I always get this:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password


So clearly password authentication is not enabled !
The final straw is this: I get this same error message EVEN WHEN I SSH FROM THIS BOX TO ITSELF! There HAS to be some SSH setting I am missing.
Can someone please advise me what this setting is?










share|improve this question





















  • Hi, and welcome. Did you restart sshd after modifying the configuration file?
    – Andy Dalton
    Aug 23 at 14:18










  • Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
    – Vinod
    Aug 23 at 14:50










  • Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
    – Kenster
    Aug 23 at 14:57










  • What is tbe exact command that you are using to log into the Centos 7 machine?
    – Nasir Riley
    Aug 23 at 17:36










  • I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
    – Paul Cartier
    Aug 23 at 18:30















up vote
0
down vote

favorite












I have a frustrating SSH access problem on a new VM with Centos 7 which is driving me crazy!! It seems to be a first-time login problem on the new box.
I know all the basic settings ... this is about the 5th VM I have set up with this OS (So ifcfg.eth0, hostname, network etc is all good).
I can ping the new box as well ... remotely and from it to other boxes in the network. But ...
When I attempt remote SSH access I just keep getting the error:



Permission denied (publickey,gssapi-keyex,gssapi-with-mic)


I have seen this before and know about /etc/ssh/ssh_config ... and we are just talking password authentication here (not ssh key login). But only on this box I am getting it. I started off with just:



host *
GSSAPIAuthentication yes


This is what I used on the other machines and it always worked!
So, I have since tried uncommenting these keys:



#PasswordAuthentication yes


and



#PermitRootLogin yes


Above because I am logging in with root. And ... I also tried commenting out GSSAPIAuthentication. And yes ... I always restart the sshd daemon after making changes to this file (systemctl restart sshd.services)
Also ... I see nothing significant in /var/log/messages or /var/log/secure .. I've tried verbose using the ssh -v switch and what I do notice on this problem box is that shortly before the above "Permission denied" error is output I get this message:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic


Whereas on other boxes which work I always get this:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password


So clearly password authentication is not enabled !
The final straw is this: I get this same error message EVEN WHEN I SSH FROM THIS BOX TO ITSELF! There HAS to be some SSH setting I am missing.
Can someone please advise me what this setting is?










share|improve this question





















  • Hi, and welcome. Did you restart sshd after modifying the configuration file?
    – Andy Dalton
    Aug 23 at 14:18










  • Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
    – Vinod
    Aug 23 at 14:50










  • Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
    – Kenster
    Aug 23 at 14:57










  • What is tbe exact command that you are using to log into the Centos 7 machine?
    – Nasir Riley
    Aug 23 at 17:36










  • I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
    – Paul Cartier
    Aug 23 at 18:30













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a frustrating SSH access problem on a new VM with Centos 7 which is driving me crazy!! It seems to be a first-time login problem on the new box.
I know all the basic settings ... this is about the 5th VM I have set up with this OS (So ifcfg.eth0, hostname, network etc is all good).
I can ping the new box as well ... remotely and from it to other boxes in the network. But ...
When I attempt remote SSH access I just keep getting the error:



Permission denied (publickey,gssapi-keyex,gssapi-with-mic)


I have seen this before and know about /etc/ssh/ssh_config ... and we are just talking password authentication here (not ssh key login). But only on this box I am getting it. I started off with just:



host *
GSSAPIAuthentication yes


This is what I used on the other machines and it always worked!
So, I have since tried uncommenting these keys:



#PasswordAuthentication yes


and



#PermitRootLogin yes


Above because I am logging in with root. And ... I also tried commenting out GSSAPIAuthentication. And yes ... I always restart the sshd daemon after making changes to this file (systemctl restart sshd.services)
Also ... I see nothing significant in /var/log/messages or /var/log/secure .. I've tried verbose using the ssh -v switch and what I do notice on this problem box is that shortly before the above "Permission denied" error is output I get this message:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic


Whereas on other boxes which work I always get this:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password


So clearly password authentication is not enabled !
The final straw is this: I get this same error message EVEN WHEN I SSH FROM THIS BOX TO ITSELF! There HAS to be some SSH setting I am missing.
Can someone please advise me what this setting is?










share|improve this question













I have a frustrating SSH access problem on a new VM with Centos 7 which is driving me crazy!! It seems to be a first-time login problem on the new box.
I know all the basic settings ... this is about the 5th VM I have set up with this OS (So ifcfg.eth0, hostname, network etc is all good).
I can ping the new box as well ... remotely and from it to other boxes in the network. But ...
When I attempt remote SSH access I just keep getting the error:



Permission denied (publickey,gssapi-keyex,gssapi-with-mic)


I have seen this before and know about /etc/ssh/ssh_config ... and we are just talking password authentication here (not ssh key login). But only on this box I am getting it. I started off with just:



host *
GSSAPIAuthentication yes


This is what I used on the other machines and it always worked!
So, I have since tried uncommenting these keys:



#PasswordAuthentication yes


and



#PermitRootLogin yes


Above because I am logging in with root. And ... I also tried commenting out GSSAPIAuthentication. And yes ... I always restart the sshd daemon after making changes to this file (systemctl restart sshd.services)
Also ... I see nothing significant in /var/log/messages or /var/log/secure .. I've tried verbose using the ssh -v switch and what I do notice on this problem box is that shortly before the above "Permission denied" error is output I get this message:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic


Whereas on other boxes which work I always get this:



debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password


So clearly password authentication is not enabled !
The final straw is this: I get this same error message EVEN WHEN I SSH FROM THIS BOX TO ITSELF! There HAS to be some SSH setting I am missing.
Can someone please advise me what this setting is?







centos sshd






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 23 at 13:57









Paul Cartier

1




1











  • Hi, and welcome. Did you restart sshd after modifying the configuration file?
    – Andy Dalton
    Aug 23 at 14:18










  • Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
    – Vinod
    Aug 23 at 14:50










  • Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
    – Kenster
    Aug 23 at 14:57










  • What is tbe exact command that you are using to log into the Centos 7 machine?
    – Nasir Riley
    Aug 23 at 17:36










  • I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
    – Paul Cartier
    Aug 23 at 18:30

















  • Hi, and welcome. Did you restart sshd after modifying the configuration file?
    – Andy Dalton
    Aug 23 at 14:18










  • Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
    – Vinod
    Aug 23 at 14:50










  • Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
    – Kenster
    Aug 23 at 14:57










  • What is tbe exact command that you are using to log into the Centos 7 machine?
    – Nasir Riley
    Aug 23 at 17:36










  • I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
    – Paul Cartier
    Aug 23 at 18:30
















Hi, and welcome. Did you restart sshd after modifying the configuration file?
– Andy Dalton
Aug 23 at 14:18




Hi, and welcome. Did you restart sshd after modifying the configuration file?
– Andy Dalton
Aug 23 at 14:18












Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
– Vinod
Aug 23 at 14:50




Make sure you are writing those lines (PasswordAuthentication yes and PermitRootLogin yes) in /etc/ssh/sshd_config, and not the ssh_config. I notice you mentioning ssh_config in your question. If you are doing this right, it should work after restarting ssh service.
– Vinod
Aug 23 at 14:50












Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
– Kenster
Aug 23 at 14:57




Please edit your question to include the contents of your sshd_config file (or at least the relevant parts), instead of describing what's in it and what you changed.
– Kenster
Aug 23 at 14:57












What is tbe exact command that you are using to log into the Centos 7 machine?
– Nasir Riley
Aug 23 at 17:36




What is tbe exact command that you are using to log into the Centos 7 machine?
– Nasir Riley
Aug 23 at 17:36












I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
– Paul Cartier
Aug 23 at 18:30





I am using this: ssh root@centoshost ... at least most of the time. But I have also used the -i switch to indicate path to pubkey. And of course the -v sometimes to get verbose
– Paul Cartier
Aug 23 at 18:30











1 Answer
1






active

oldest

votes

















up vote
0
down vote













You commented out the password authentication. Therefore, openSSH is not accepting passwords as an authentication measure. The same applies to root login.



Remove the # on the lines



PasswordAuthentication yes
PermitRootLogin yes


Then restart the service.






share|improve this answer




















  • I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
    – Paul Cartier
    Aug 23 at 14:24










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%2f464409%2fcentos-7-ssh-permission-denied-why-no-password%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
0
down vote













You commented out the password authentication. Therefore, openSSH is not accepting passwords as an authentication measure. The same applies to root login.



Remove the # on the lines



PasswordAuthentication yes
PermitRootLogin yes


Then restart the service.






share|improve this answer




















  • I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
    – Paul Cartier
    Aug 23 at 14:24














up vote
0
down vote













You commented out the password authentication. Therefore, openSSH is not accepting passwords as an authentication measure. The same applies to root login.



Remove the # on the lines



PasswordAuthentication yes
PermitRootLogin yes


Then restart the service.






share|improve this answer




















  • I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
    – Paul Cartier
    Aug 23 at 14:24












up vote
0
down vote










up vote
0
down vote









You commented out the password authentication. Therefore, openSSH is not accepting passwords as an authentication measure. The same applies to root login.



Remove the # on the lines



PasswordAuthentication yes
PermitRootLogin yes


Then restart the service.






share|improve this answer












You commented out the password authentication. Therefore, openSSH is not accepting passwords as an authentication measure. The same applies to root login.



Remove the # on the lines



PasswordAuthentication yes
PermitRootLogin yes


Then restart the service.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 23 at 14:20









Panki

1739




1739











  • I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
    – Paul Cartier
    Aug 23 at 14:24
















  • I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
    – Paul Cartier
    Aug 23 at 14:24















I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
– Paul Cartier
Aug 23 at 14:24




I did uncomment them. See above: "I have since tried uncommenting these keys:" And .. I did restart sshd ... also above "And yes ... I always restart the sshd daemon after making changes to this file" In fact I've started sshd, networking and the entire VM many many times :-)
– Paul Cartier
Aug 23 at 14:24

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464409%2fcentos-7-ssh-permission-denied-why-no-password%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?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?