LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-17-2010, 05:29 PM   #1
C4talyst
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Rep: Reputation: 0
SSHD Direct Root Logins - STUMPED...


Ok, so I have a customer running an older Fedora Core release and using it for production web hosting. He's also using cpanel and has asked them to help with migrating some of his sites to a new server.

Apparently the cpanel staff have requested temporary direct-root logins enabled so they can use some of their mgiration tools. Well, I have PermitRootLogin set to yes in sshd_config, sshd is restarted, and when you try to login via putty as root, you get the "Access Denied" message.

Strangely, /var/log/messages shows the following:

Aug 17 15:23:04 linux1 sshd[19432]: Failed password for root from 216.xxx.xx.xx port 16055 ssh2

HOWEVER, I know I'm using the correct root password as I just set it and I can 'su -' with it. What the heck is going on with this????

...and thanks!
 
Old 08-17-2010, 05:42 PM   #2
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
The gods are letting you know not to give up root access.
 
1 members found this post helpful.
Old 08-17-2010, 05:53 PM   #3
jys17
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
check your /etc/hosts.allow and /etc/hosts.deny, I think there is something about SSHD blocking from some ports in there.
 
Old 08-17-2010, 06:18 PM   #4
C4talyst
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jys17 View Post
check your /etc/hosts.allow and /etc/hosts.deny, I think there is something about SSHD blocking from some ports in there.
I'll look, but I can login as other users, just not root.
 
Old 08-17-2010, 06:18 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Could you post the /etc/sshd/sshd_config file. Also look at the pam configuration.

Try logging in with "ssh -vv" for more debug information. ( I don't know if putty has a verbosity setting )

You could use pubkey authentication. I believe using "PermitRoot without-password" will allow you to use public key authentication for root while the default for regular users remains the same. It is possible to use both types as well.

Also look in /etc/security/ to see if there are prohibitions against root logins on certain interfaces or terminals.

Does the problem exist if you try to log in from a Linux system instead of Windows? My thinking here is character encoding issues. Such as if windows is using utf-16 instead of utf-8. Does root use a different encoding then your regular user?

Quote:
I know I'm using the correct root password as I just set it and I can 'su -' with it.
Could you give them a regular account so they can run "su -" themselves and then run their tools?
 
Old 08-18-2010, 10:12 AM   #6
C4talyst
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Everything in /etc/security was set to defaults...no blockage there. Here is the sshd_config file:
 
Old 08-18-2010, 10:13 AM   #7
C4talyst
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Everything in /etc/security was set to defaults...no blockage there. Here is the sshd_config file:

Code:
#       $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
Protocol 2
#AddressFamily any
ListenAddress xxx.xxx.xxx.xxx
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /usr/local/etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /usr/local/etc/ssh_host_rsa_key
#HostKey /usr/local/etc/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /usr/local/etc/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem       sftp    /usr/local/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server
 
Old 08-18-2010, 10:15 AM   #8
C4talyst
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
I think the kicker here is that /var/log/messages reports that password problem...even though I'm using the correct password.
 
  


Reply



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
SSH will not allow root logins paidbythehour Solaris / OpenSolaris 13 08-14-2009 08:32 AM
winbind + AD + sshd allowgroups = unreliable ssh logins. trey85stang Linux - Enterprise 1 06-03-2009 04:17 PM
Disabling direct root logins slackwarefan Slackware 3 03-01-2009 11:08 PM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 04:59 AM
Only root logins allowed?? rakamaka Linux - Software 4 10-12-2006 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:45 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
Open Source Consulting | Domain Registration