LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2009, 02:16 PM   #1
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 33
problems with passwordless log in as root with SSH


In /etc/ssh/sshd_config if I use this line, passwordless login works as intended:

Code:
# Authentication:
PermitRootLogin yes
AllowUsers root@*
But if I change it to this (which is what I want for better security), the login is not permitted. (It asks for a password, and no root password exists.)
Code:
# Authentication:
PermitRootLogin yes
AllowUsers root@192.168.100.101
The client has this IP address:
Code:
$ ifconfig
eth1      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxx  
          inet addr:192.168.100.101
and eth1 is the active interface.

So why does the login not work when I specify the IP address that is allowed, but it does work when I open it up to any IP addresses?

How would you trouble shoot this? Which log should I look in to find the IP address that is attempting to log in?

Last edited by Mountain; 05-05-2009 at 02:29 PM.
 
Old 05-05-2009, 02:28 PM   #2
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
I discovered auth.log. It showed me the clues I needed.

The hosts file on the ssh server has an entry like this:

Code:
192.168.100.101 	myclient.asdf.xx.my_isp.org	myclient
I had tried both the IP address and the short host name. But I saw in auth.log that the access denial was listing my fully qualified host name.

So I changed /etc/ssh/sshd_config to this:
Code:
AllowUsers root@myclient.asdf.xx.my_isp.org
Now it works.

Last edited by Mountain; 05-05-2009 at 02:30 PM.
 
  


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
SSH Alert when root attempts to log gamehack Linux - Software 3 06-03-2009 07:44 AM
passwordless SSH works for root but not www-data zovres Linux - General 1 07-26-2006 12:31 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM
root cant log in to ssh Red Squirrel Linux - Software 2 08-26-2005 01:17 PM
ssh won't log root in m2azer Linux - General 9 12-26-2004 12:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 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