CentOS 7. SSH Permission denied. Why no password?
Clash 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?
centos sshd
 |Â
show 1 more comment
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?
centos sshd
Hi, and welcome. Did you restartsshd
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 yoursshd_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
 |Â
show 1 more comment
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?
centos sshd
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
centos sshd
asked Aug 23 at 13:57
Paul Cartier
1
1
Hi, and welcome. Did you restartsshd
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 yoursshd_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
 |Â
show 1 more comment
Hi, and welcome. Did you restartsshd
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 yoursshd_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
 |Â
show 1 more comment
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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