LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-13-2011, 04:32 AM   #1
satya123
Member
 
Registered: Mar 2011
Posts: 31

Rep: Reputation: 0
Unable to login as root through SSH


Hi,

I am unable to login as root to a linux machine through SSH. Login through console is working fine. SSH is not working only for root user. It is working fine for other users. I have checked the sshd_config file and it says:

PermitRootLogin yes

I'd be grateful if somebody can give an idea about what is going wrong.

Thanks in advance.
 
Old 04-13-2011, 04:34 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 115Reputation: 115
What distribution?
 
Old 04-13-2011, 04:45 AM   #3
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
what command did you use to make a connection with ssh?

something like
Code:
ssh root@host
 
Old 04-13-2011, 04:52 AM   #4
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
Quick work around would be to log in as the normal user and then su to root
Code:
usr@local-sys $ ssh usr@remote
...
usr@remote $ su -
Password: 
root@remote #
 
1 members found this post helpful.
Old 04-13-2011, 05:00 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Try connecting with verbosity on:
Code:
ssh -vv root@host
and post errors here if you need help resolving them.

Kind regards,

Eric
 
Old 04-13-2011, 05:05 AM   #6
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by EricTRA View Post
Hello,

Try connecting with verbosity on:
Code:
ssh -vv root@host
and post errors here if you need help resolving them.

Kind regards,

Eric
Correction: I don't want to be a 'nosepicker' but it's
Code:
ssh -v root@host
It's just that if our friend (the OP) is just starting to learn Linux, he might get confused (no offence to all of you)

How are you Eric? Long time no see

Last edited by brownie_cookie; 04-13-2011 at 05:06 AM.
 
Old 04-13-2011, 06:15 AM   #7
satya123
Member
 
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Distro is SUSE.

I am connecting to the machine through a putty session. Putty internally uses SSH.
 
Old 04-13-2011, 06:23 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by brownie_cookie View Post
Correction: I don't want to be a 'nosepicker' but it's
Code:
ssh -v root@host
It's just that if our friend (the OP) is just starting to learn Linux, he might get confused (no offence to all of you)

How are you Eric? Long time no see
Hi,

Doing fine, working hard

Not 'nosepicking' either but from the ssh man page:
Quote:
-v Verbose mode. Causes ssh to print debugging messages about its progress. This is helpful in debugging connection, authentication, and configuration problems. Multiple -v options increase
the verbosity. The maximum is 3.
so -vv is a valid option and will show much more information, which is needed considering that OP pointed out that PermitRootLogin yes is present in sshd_config.

Kind regards,

Eric
 
Old 04-13-2011, 06:40 AM   #9
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by EricTRA View Post
Hi,

Doing fine, working hard
When is you colleague back?


Quote:
Originally Posted by EricTRA View Post
Not 'nosepicking' either but from the ssh man page:

so -vv is a valid option and will show much more information, which is needed considering that OP pointed out that PermitRootLogin yes is present in sshd_config.

Kind regards,

Eric
sorry wasn't meant to be rude and thanks for the info, didn't looked that far
but thx now i also know it ^^
 
Old 04-13-2011, 06:44 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by brownie_cookie View Post
When is you colleague back?
sorry wasn't meant to be rude and thanks for the info, didn't looked that far
but thx now i also know it ^^
Hi,

He'll be back in two weeks. Not considered rude, don't worry and glad you learned something.

Kind regards,

Eric
 
Old 04-13-2011, 06:55 AM   #11
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
still 2 weeks... hang in there

Thanks again Eric !!!

(now no more offtopic things )

So satya123 can you give us some feedback??
 
1 members found this post helpful.
Old 04-13-2011, 07:03 AM   #12
satya123
Member
 
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
yes..
Well, ssh -vv is giving me the entire procedure of how packets are sent and recieved. But when it comes to password part, it says "Permission denied. Please try again"
 
Old 04-13-2011, 07:07 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Did you restart the ssh daemon after you made the changes?

Kind regards
 
1 members found this post helpful.
Old 04-13-2011, 07:07 AM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Are you sure about the password you typed in? Probably dumb remark but when you connect to a remote server as root you need to type the password of the root account on that remote server. If you don't have any protocol errors and ssh keeps asking for your password then most likely you're typing the wrong password (or just mistyping it).

Kind regards,

Eric
 
Old 04-13-2011, 07:10 AM   #15
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by repo View Post
Did you restart the ssh daemon after you made the changes?

Kind regards
Hi repo,

OP didn't indicate he made changes so restarting is not needed. He only mentioned he checked the value of PermitRootLogin.

@OP: did you change the value of PermitRootLogin yourself? If so, follow repo's suggestion.

Kind regards,

Eric
 
  


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
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 09:01 AM
Unable to login as root your_shadow03 Red Hat 2 01-03-2011 07:50 PM
SSH login banner/No root login jmoschetti45 Linux - Security 3 01-17-2010 05:51 PM
Unable to login via console or SSH predatorz Fedora 8 01-07-2008 01:17 AM
Unable to login via console or SSH predatorz Linux - General 3 01-05-2008 08:23 AM


All times are GMT -5. The time now is 10:17 PM.

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