Permission denied please try again ssh error

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I had a root access to my server and I was logged in through ssh. I I did this in my
AllowUsers john
/etc/ssh/sshd_config
in this file.
Now after this I rebooted the server. now I am unable to login through root user and unable to login through john as well. nothing is working. Please help?
my root user was this e.g root@ip
If I try to login ssh root@ip through root it says this
Permission denied, please try again.
If I try to login with john it says
Shell access is not enabled on your account!
If you need shell access please contact support.
I don't understand why I am unable to login through my root account.
Note: I can successfully login through in WHM
server ssh users
add a comment |Â
up vote
0
down vote
favorite
I had a root access to my server and I was logged in through ssh. I I did this in my
AllowUsers john
/etc/ssh/sshd_config
in this file.
Now after this I rebooted the server. now I am unable to login through root user and unable to login through john as well. nothing is working. Please help?
my root user was this e.g root@ip
If I try to login ssh root@ip through root it says this
Permission denied, please try again.
If I try to login with john it says
Shell access is not enabled on your account!
If you need shell access please contact support.
I don't understand why I am unable to login through my root account.
Note: I can successfully login through in WHM
server ssh users
1
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I had a root access to my server and I was logged in through ssh. I I did this in my
AllowUsers john
/etc/ssh/sshd_config
in this file.
Now after this I rebooted the server. now I am unable to login through root user and unable to login through john as well. nothing is working. Please help?
my root user was this e.g root@ip
If I try to login ssh root@ip through root it says this
Permission denied, please try again.
If I try to login with john it says
Shell access is not enabled on your account!
If you need shell access please contact support.
I don't understand why I am unable to login through my root account.
Note: I can successfully login through in WHM
server ssh users
I had a root access to my server and I was logged in through ssh. I I did this in my
AllowUsers john
/etc/ssh/sshd_config
in this file.
Now after this I rebooted the server. now I am unable to login through root user and unable to login through john as well. nothing is working. Please help?
my root user was this e.g root@ip
If I try to login ssh root@ip through root it says this
Permission denied, please try again.
If I try to login with john it says
Shell access is not enabled on your account!
If you need shell access please contact support.
I don't understand why I am unable to login through my root account.
Note: I can successfully login through in WHM
server ssh users
server ssh users
edited Apr 10 at 20:50
asked Apr 10 at 19:20
mynameisbutt
11
11
1
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28
add a comment |Â
1
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28
1
1
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
Also note: the AllowUsers specifies that login is allowed only for those user names that match a pattern listed with this keyword. By default, login is allowed for all user names. So, with your configuration, john is the only user that can log in using ssh.
The answer from Sebastian Stark is also correct: root would not be able to login by default, even if you had included root in AllowUsers.
So: I recommend, first, making sure that user john can login correctly. Make sure that john has a shell assigned in /etc/passwd and give him one using chsh if necessary. Then, login as john and use sudo if you need root access.
add a comment |Â
up vote
1
down vote
By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.
In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.
So to fix your particular problem make those two settings in sshd_config look like this:
PermitRootLogin yes
AllowUsers root john
and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.
As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.
Safety measures
In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.
Rebooting the whole server is never necessary for activating changes to sshd.
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Also note: the AllowUsers specifies that login is allowed only for those user names that match a pattern listed with this keyword. By default, login is allowed for all user names. So, with your configuration, john is the only user that can log in using ssh.
The answer from Sebastian Stark is also correct: root would not be able to login by default, even if you had included root in AllowUsers.
So: I recommend, first, making sure that user john can login correctly. Make sure that john has a shell assigned in /etc/passwd and give him one using chsh if necessary. Then, login as john and use sudo if you need root access.
add a comment |Â
up vote
1
down vote
Also note: the AllowUsers specifies that login is allowed only for those user names that match a pattern listed with this keyword. By default, login is allowed for all user names. So, with your configuration, john is the only user that can log in using ssh.
The answer from Sebastian Stark is also correct: root would not be able to login by default, even if you had included root in AllowUsers.
So: I recommend, first, making sure that user john can login correctly. Make sure that john has a shell assigned in /etc/passwd and give him one using chsh if necessary. Then, login as john and use sudo if you need root access.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Also note: the AllowUsers specifies that login is allowed only for those user names that match a pattern listed with this keyword. By default, login is allowed for all user names. So, with your configuration, john is the only user that can log in using ssh.
The answer from Sebastian Stark is also correct: root would not be able to login by default, even if you had included root in AllowUsers.
So: I recommend, first, making sure that user john can login correctly. Make sure that john has a shell assigned in /etc/passwd and give him one using chsh if necessary. Then, login as john and use sudo if you need root access.
Also note: the AllowUsers specifies that login is allowed only for those user names that match a pattern listed with this keyword. By default, login is allowed for all user names. So, with your configuration, john is the only user that can log in using ssh.
The answer from Sebastian Stark is also correct: root would not be able to login by default, even if you had included root in AllowUsers.
So: I recommend, first, making sure that user john can login correctly. Make sure that john has a shell assigned in /etc/passwd and give him one using chsh if necessary. Then, login as john and use sudo if you need root access.
edited Apr 10 at 19:49
answered Apr 10 at 19:44
Martin W
74238
74238
add a comment |Â
add a comment |Â
up vote
1
down vote
By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.
In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.
So to fix your particular problem make those two settings in sshd_config look like this:
PermitRootLogin yes
AllowUsers root john
and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.
As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.
Safety measures
In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.
Rebooting the whole server is never necessary for activating changes to sshd.
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
add a comment |Â
up vote
1
down vote
By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.
In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.
So to fix your particular problem make those two settings in sshd_config look like this:
PermitRootLogin yes
AllowUsers root john
and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.
As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.
Safety measures
In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.
Rebooting the whole server is never necessary for activating changes to sshd.
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
add a comment |Â
up vote
1
down vote
up vote
1
down vote
By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.
In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.
So to fix your particular problem make those two settings in sshd_config look like this:
PermitRootLogin yes
AllowUsers root john
and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.
As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.
Safety measures
In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.
Rebooting the whole server is never necessary for activating changes to sshd.
By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.
In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.
So to fix your particular problem make those two settings in sshd_config look like this:
PermitRootLogin yes
AllowUsers root john
and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.
As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.
Safety measures
In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.
Rebooting the whole server is never necessary for activating changes to sshd.
edited Apr 10 at 20:15
answered Apr 10 at 19:41
Sebastian Stark
4,708938
4,708938
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
add a comment |Â
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
I have the access of whm. Can I edit the ssd file from there
â mynameisbutt
Apr 10 at 20:11
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
Answer updated, you should be able to recover using those instructions.
â Sebastian Stark
Apr 10 at 20:15
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2faskubuntu.com%2fquestions%2f1023771%2fpermission-denied-please-try-again-ssh-error%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
1
can you post the exact command and (error) output of the terminal when you are trying to log in as john?
â Sebastian Stark
Apr 10 at 19:23
@ Sebastian Stark if I try to login through john it says Shell access is not enabled on your account! If you need shell access please contact support.
â mynameisbutt
Apr 10 at 19:26
@SebastianStark I have updated my question
â mynameisbutt
Apr 10 at 19:28