LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2007, 02:25 PM   #1
linuxuser00
LQ Newbie
 
Registered: Dec 2006
Posts: 10

Rep: Reputation: 0
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
 
Old 01-30-2007, 02:31 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 01-30-2007, 02:38 PM   #3
linuxuser00
LQ Newbie
 
Registered: Dec 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Is there another way to fix it without creating a user account?
 
Old 01-30-2007, 04:48 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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...
 
Old 01-30-2007, 08:42 PM   #5
shorun
Member
 
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148

Rep: Reputation: 15
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.
 
Old 01-31-2007, 12:05 PM   #6
linuxuser00
LQ Newbie
 
Registered: Dec 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Talking

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root password doesn't work SlowMindThinkin Linux - Newbie 9 04-18-2005 12:19 AM
root password doesn't work when I use sudo ... bucovaina78 Linux - Security 5 11-10-2004 03:50 PM
KDM root password won't work linda Slackware 6 08-12-2004 05:58 PM
Get password of root from SSH? Gerardoj Linux - General 4 08-09-2003 12:07 PM
root password doesnt work MAGOVIA Linux - Newbie 3 06-30-2003 02:29 PM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration