log message

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

log message

Postby hirohitosan » 17 Jan 2009, 12:53

Hi there.
During exploring my logs I found a message that appear often:
Code: Select all
kernel: Jan 17 11:47:38 user inetd[902]: ssh/tcp: bind: Address already in use

how can I get rid of that and from where it comes?

thanks
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby ale » 17 Jan 2009, 13:15

Are you starting sshd with inetd?
Check the output of
Code: Select all
$ grep sshd /etc/rc.conf
$ grep sshd /etc/inetd.conf
User avatar
ale
Senior Member
 
Posts: 1064
Joined: 19 Nov 2008, 01:28
Location: Roma

Postby hirohitosan » 17 Jan 2009, 13:20

yes
Code: Select all
grep sshd /etc/rc.conf
sshd_enable="YES"
> grep sshd /etc/inetd.conf
ssh     stream  tcp     nowait  root    /usr/sbin/sshd          sshd -i -4
#ssh    stream  tcp6    nowait  root    /usr/sbin/sshd          sshd -i -6
>
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby ale » 17 Jan 2009, 13:31

You see, you are starting it twice.
Either comment the one in /etc/rc.conf or the one in /etc/inetd.conf depending on how you want to have it started.
User avatar
ale
Senior Member
 
Posts: 1064
Joined: 19 Nov 2008, 01:28
Location: Roma

Postby hirohitosan » 17 Jan 2009, 16:58

Thanks ... :r I understood. And if we are here. I disable sshd in inetd. In this case my inetd starts nothing. Does it make sense to start it at boot?

thanks
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby DutchDaemon » 17 Jan 2009, 17:03

If you don't have anything enabled in inetd.conf there's no need to start it from rc.conf at all, so you can remove the inetd_enable="YES" line from it.
User avatar
DutchDaemon
Old Fart
 
Posts: 10464
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby hirohitosan » 17 Jan 2009, 19:16

Thanks. I disable inetd and reboot
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby ale » 17 Jan 2009, 19:26

You for completeness, a reboot is not needed, you can use something like [cmd=#]/etc/rc.d/inetd forcestop[/cmd] or with [cmd=#]/etc/rc.d/inetd stop[/cmd] before commenting the line in /etc/rc.conf
User avatar
ale
Senior Member
 
Posts: 1064
Joined: 19 Nov 2008, 01:28
Location: Roma

Postby hirohitosan » 17 Jan 2009, 20:21

Thank you. And for my full completeness, what is the difference in starting a server through inetd or standalone? Is there any suggestions in this?
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby ale » 17 Jan 2009, 20:36

If you start it from /etc/rc.conf sshd will be up listening on (default) port 22 .
If you start it from /etc/inetd.conf, inetd will be listening on the same port. When a connection to that port is opened, inetd will start sshd and it will stop it when the connection get closed.
User avatar
ale
Senior Member
 
Posts: 1064
Joined: 19 Nov 2008, 01:28
Location: Roma

Postby hirohitosan » 17 Jan 2009, 23:33

Thank you. I got it
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests