Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sshd is ignoring /etc/ssh/sshd_config
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cs.cracker
n00b
n00b


Joined: 06 Mar 2005
Posts: 62

PostPosted: Sat Apr 23, 2005 1:56 am    Post subject: sshd is ignoring /etc/ssh/sshd_config Reply with quote

I dont know why. I want to disable root logons for sercurity and add a banner message, but editing /etc/ssh/sshd_config does not work. I dont know why, but it is completely ignoring it. I dont know what files I should post, so any help at all is appreciated.
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Sat Apr 23, 2005 10:41 am    Post subject: sshd_config Reply with quote

I cannot guess why but you can pass extra arguments to sshd like;

Quote:

-f configuration_file
Specifies the name of the configuration file. The default is /etc/ssh/sshd_config. sshd refuses to start if
there is no configuration file.


default is /etc/ssh/sshd_config. To debug your problem you can start sshd with -f flag.
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Sat Apr 23, 2005 5:24 pm    Post subject: Reply with quote

Changes in sshd_config won't take effect until you restart sshd.

-Mike
Back to top
View user's profile Send private message
cs.cracker
n00b
n00b


Joined: 06 Mar 2005
Posts: 62

PostPosted: Mon Apr 25, 2005 7:14 pm    Post subject: Reply with quote

I have restarted sshd. How would I pass this flag through init.d?
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Tue Apr 26, 2005 5:17 pm    Post subject: Reply with quote

Hrm...what happens if you add some gibberish to /etc/ssh/sshd_config (anything, like the line "hello world") and then do /etc/init.d/sshd restart?

-Mike
Back to top
View user's profile Send private message
cs.cracker
n00b
n00b


Joined: 06 Mar 2005
Posts: 62

PostPosted: Tue May 03, 2005 11:56 pm    Post subject: Reply with quote

sshd restarts fine and runs exactly like it did before I modified the file.
Back to top
View user's profile Send private message
justanothergentoofanatic
Guru
Guru


Joined: 29 Feb 2004
Posts: 337

PostPosted: Fri May 06, 2005 5:38 pm    Post subject: Reply with quote

Very strange...what happens if you do /usr/bin/sshd -f /etc/ssh/sshd_config?

What use flags and cflags did you compile sshd with?

md5sum /etc/init.d/sshd gives me:
0a1428803057b7d25e624c6b297980d8 /etc/init.d/sshd

Is yours the same?

-Mike
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Sat May 07, 2005 2:30 am    Post subject: Reply with quote

Did you compile your sshd outside of the portage system by any chance?
If yes - you're on your own until you stick to portage's version.
If no - what's your current openssh version?
What happens if you run sshd in debug mode, like this:
Code:
/usr/sbin/sshd -ddd
? The first three or so lines should indicate the localtion of its used configuration.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum