LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-25-2003, 12:32 AM   #1
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
Only root can login via ssh


I have a linux dns server/smtp server that I configured. I would eventually remove the mouse, keyboard and monitor and hide the box somewhere and leave it running all the time. I installed the latest openssl and openssh package by source (I am running Redhat 5.2). I find that I can only remote login if I login as root. If I login as any other user, the connection to the linux box is closed by remote host. This happens even If I try to ssh locally with ssh -l user localhost. If I look at the logs I see password authentication succeeded
channel 0: new [client-session]
channel 0: send open
Entering interactive session
callback start
ssh_session2_setup:id 0
channel 0:request pty-req
channel 0:request shell
callback done
channel 0: open confirm rwindow - rmax 32768
channel_free: channel 0: client-session,nchannels 1
Connection to localhost closed by remote host
Connection to localhost closed.
Transferred : stdin 0, stdout 0, stderr 81 bytes in 0.4 seconds
Bytes per second: stdin 0.0, stdout 0.0, stderr 217.1
Exit status -1

In /var/log/messages I see:
Accepted password for user from 127.0.0.1 port 104 ssh2
fatal : mm_receive_fd : expected type 1 got 10443377

If I login as root, everything is fine loggin in remotely or locally. Thanks for any help you can give.
 
Old 04-25-2003, 12:58 AM   #2
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
http://www.der-keiler.de/Mailing-Lis...2-12/0005.html

What happens if you turn off privelege seperation and restart sshd?
 
Old 04-25-2003, 06:30 PM   #3
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Thank You Very Much!
I deleted the sshd priv sep user and group and then disabled it in sshd_config. User can now log on. You just saved me countless hours of figuring out.
 
Old 04-25-2003, 08:02 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I hope you realize privsep makes part of sshd run as root, and part in a chroot. By disabling privsep you're effectively weakening your boxes security posture by making the whole of sshd run as root. IMHO a good way to assess/curb risks would be to review the restrictions you place on remote access (if you can) using the directives in sshd_config, TCP Wrappers and the firewall.
 
Old 04-26-2003, 02:45 AM   #5
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Followint the above link by m0rl0ck, it seems that the problem is with the 2.0.x linux kernel. If so is it even fixable? Thanks
 
Old 04-26-2003, 05:16 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
IIRC it's an mmap related issue in 2.2x and below, but you'd better read up on these discussions in any mailinglist archiving site like Neohapsis.com or Der-keiler.de.
 
  


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
Allow upgrade to root after login ssh bourbon_beast Linux - Security 2 10-27-2005 04:21 AM
ssh only allow root login chongluo Linux - Newbie 1 10-28-2004 08:51 AM
Disabling root login via SSH moger Linux - Security 7 06-20-2004 03:55 PM
Only Root Login via ssh / ftp Lanmate Linux - General 2 12-22-2003 11:11 PM
Disallowing root login in SSH cire Linux - Networking 3 08-06-2003 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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