Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-16-2008, 12:24 PM   #1
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, 12:31 PM   #2
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
googling disable ssh root login yields
Old 05-16-2008, 12:37 PM   #3
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.


Old 05-17-2008, 03:03 PM   #4
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, 08:12 PM   #5
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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 ;}



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

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration