root login with openssh

This is a discussion on root login with openssh within the Linux Security forums, part of the System Security and Security Related category; Hi all, Simple question. I was playing with ssh and I tried to disable root login. In sshd_config I've ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-07-2005
Andre Lauw
 
Posts: n/a
Default root login with openssh

Hi all,
Simple question. I was playing with ssh and I tried to disable root login.
In sshd_config I've changed the line with "#PermitRootLogin yes" to
"#PermitRootLogin no" then I tried to login with root account from
somewhere else and I can still get in. Then I removed # from the line with
"#PermitRootLogin no" to "PermitRootLogin no" with no result.
My question : does someone know how to disable root login?




Andre
Reply With Quote
  #2 (permalink)  
Old 07-07-2005
Stachu 'Dozzie' K.
 
Posts: n/a
Default Re: root login with openssh

On 06.07.2005, Andre Lauw <lauw0028@planet.nl> wrote:
> Hi all,
> Simple question. I was playing with ssh and I tried to disable root login.
> In sshd_config I've changed the line with "#PermitRootLogin yes" to
> "#PermitRootLogin no" then I tried to login with root account from
> somewhere else and I can still get in. Then I removed # from the line with
> "#PermitRootLogin no" to "PermitRootLogin no" with no result.
> My question : does someone know how to disable root login?


Have you restarted SSH daemon after uncommenting line with
"PermitRootLogin"?

--
Feel free to correct my English
Stanislaw Klekot
Reply With Quote
  #3 (permalink)  
Old 07-07-2005
linuxbaby
 
Posts: n/a
Default Re: root login with openssh

Andre Lauw wrote:
> Hi all,
> Simple question. I was playing with ssh and I tried to disable root login.
> In sshd_config I've changed the line with "#PermitRootLogin yes" to
> "#PermitRootLogin no" then I tried to login with root account from
> somewhere else and I can still get in. Then I removed # from the line with
> "#PermitRootLogin no" to "PermitRootLogin no" with no result.
> My question : does someone know how to disable root login?
>
>
>
>
> Andre

Oh
Did you restart sshd service ?
try the following command:

service sshd restart
Reply With Quote
  #4 (permalink)  
Old 07-07-2005
Andre Lauw
 
Posts: n/a
Default Re: root login with openssh

linuxbaby wrote:

> Andre Lauw wrote:
>> Hi all,
>> Simple question. I was playing with ssh and I tried to disable root
>> login. In sshd_config I've changed the line with "#PermitRootLogin yes"
>> to "#PermitRootLogin no" then I tried to login with root account from
>> somewhere else and I can still get in. Then I removed # from the line
>> with "#PermitRootLogin no" to "PermitRootLogin no" with no result.
>> My question : does someone know how to disable root login?
>>
>>
>>
>>
>> Andre

> Oh
> Did you restart sshd service ?
> try the following command:
>
> service sshd restart

It works thanks for your help.

Andre
Reply With Quote
  #5 (permalink)  
Old 07-07-2005
jafar
 
Posts: n/a
Default Re: root login with openssh

Did you try restarting sshd afterwards?
On Gentoo I'd do /etc/init.d/sshd restart

--
Jafar Calley
Producer - http://moonlife-records.com
--------------------------------------
See the latest Mars and Saturn images
http://fatcat.homelinux.org

Reply With Quote
  #6 (permalink)  
Old 07-07-2005
Unruh
 
Posts: n/a
Default Re: root login with openssh

Andre Lauw <lauw0028@planet.nl> writes:

>Hi all,
>Simple question. I was playing with ssh and I tried to disable root login.
>In sshd_config I've changed the line with "#PermitRootLogin yes" to
>"#PermitRootLogin no" then I tried to login with root account from
>somewhere else and I can still get in. Then I removed # from the line with
>"#PermitRootLogin no" to "PermitRootLogin no" with no result.
>My question : does someone know how to disable root login?


You have to remember to restart sshd after you make the changes. sshd does
NOT reread its config file every time it is used. It reads it once.
Or you could do
killall -SIGHUP sshd
to have it reread its config files. (man sshd)


Note the # in froont of the line turns it into a comment.





>Andre

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0