LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-16-2008, 11:24 AM   #1
rholme
Member
 
Registered: May 2008
Posts: 47

Rep: Reputation: 15
would like to disable direct root login using ssh/sftp


rlogin and other tools allow you to set /etc/securetty to limit root direct login to the console. I am trying to disable someone from coming in directly as root, it would be preferable for the person to login as a normal user (say john) and then su to root - at least this leaves marks as to who did what when.

almost all arcane Unix utilities have something like this and even though ssh is terribly secure, direct root login from a remote machine should be stoppable.
 
Old 05-16-2008, 11:31 AM   #2
miedward
Member
 
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
googling disable ssh root login yields
http://www.webhostgear.com/24.html
 
Old 05-16-2008, 11:37 AM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Make sure that PermitRootLogin is set to no in your sshd_config file (usually /etc/ssh/sshd_config) and restart the ssh server.

HTH

Forrest
 
Old 05-17-2008, 02:03 PM   #4
rholme
Member
 
Registered: May 2008
Posts: 47

Original Poster
Rep: Reputation: 15
many thanks forrest

I am truly surprised I could find nothing in the ssh man page, but you were 100% on the money.
 
Old 05-17-2008, 07:12 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,971
Blog Entries: 11

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
Well .. the ssh man-page pertains to the client side.
It *does* however suggest to also read "man sshd", which
in turn points you at "man sshd_config" which then tells
you all about those things ;}



Cheers,
Tink
 
  


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
Disable root login via SSH not working vonedaddy Linux - Security 11 01-03-2008 08:18 PM
Disable Root login via ssh UltraSoul Solaris / OpenSolaris 3 02-09-2007 02:18 AM
Disable Root Login Via SSH = Why? carlosinfl Linux - Security 4 10-11-2006 12:32 PM
disable root login with ssh linuxtesting2 Slackware 3 02-16-2005 12:33 PM
How can I disable root login with SSH? blk96gt Slackware 9 10-02-2004 07:09 AM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration