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 |
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.
|
Is there another way to fix it without creating a user account?
|
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... |
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. |
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. |