LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root password doesn't work for ssh (https://www.linuxquestions.org/questions/linux-newbie-8/root-password-doesnt-work-for-ssh-524133/)

linuxuser00 01-30-2007 01:25 PM

root password doesn't work for ssh
 
I'm using Centos 4.2. When I console into my server the root password is fine, but when I try to ssh into the server the root password doesn't work. I checked sshd_config and verified root login is enabled. I'm not sure what else to do. Please help

Thanks,

linuxuser00

acid_kewpie 01-30-2007 01:31 PM

well you shouldn't be doing this anyway. if you can 1) ssh into the box as a normal user and 2) su to become root then you have a vastly prefeable solution in terms of security.

linuxuser00 01-30-2007 01:38 PM

Is there another way to fix it without creating a user account?

acid_kewpie 01-30-2007 03:48 PM

you shoudl never never not have a normal user account... that said it should be possible if your ssh server permits a root login. show us the sshd_config file and also check /var/log/secure for possible reasons for being rejected.

mind you, you sound like you've *never* logged in through ssh, if you've only got a root user...

shorun 01-30-2007 07:42 PM

simple, check /etc/sshd.conf or /etc/sshd/sshd.conf for the line
"allow_root_login=no"and change it to "yes"
note: if there is a "#" in front of the line, remove it.

second note: running an ssh-server with root-allowed is VERRY dangerous, i would reccoment adding a user just for the sake of security.

best i would reccomend is the following:

useradd -G users,wheel username
passwd username

and then using this user to login in ssh using "su" as told above.
choice is yours, but the risk is yours as well.

linuxuser00 01-31-2007 11:05 AM

Thanks to everyone who replied to this thread! :) You're right, I don't have a lot of experience with ssh or Linux. I'm learning as I go allowing. Anyway, after hours of troubleshooting it was my mistake, (I had assigned it an unavailable IP address. The reason why I could ssh to it was because the info was not saved in the ifcfg-eth0 file). After reading further about security issues and ssh I decided to take everyones advice and disable "PermitRootLogin".

thanks again!

linuxuser00 :newbie:


All times are GMT -5. The time now is 03:59 PM.