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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |