1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

log message

Discussion in 'General' started by hirohitosan, Jan 17, 2009.

  1. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    Hi there.
    During exploring my logs I found a message that appear often:
    Code:
    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
     
  2. ale

    ale New Member

    Messages:
    1,059
    Likes Received:
    0
    Are you starting sshd with inetd?
    Check the output of
    Code:
    $ grep sshd /etc/rc.conf
    $ grep sshd /etc/inetd.conf
     
  3. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    yes
    Code:
    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
    >
    
     
  4. ale

    ale New Member

    Messages:
    1,059
    Likes Received:
    0
    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.
     
  5. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    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
     
  6. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,622
    Likes Received:
    2
    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.
     
  7. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    Thanks. I disable inetd and reboot
     
  8. ale

    ale New Member

    Messages:
    1,059
    Likes Received:
    0
    You for completeness, a reboot is not needed, you can use something like # /etc/rc.d/inetd forcestop or with # /etc/rc.d/inetd stop before commenting the line in /etc/rc.conf
     
  9. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    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?
     
  10. ale

    ale New Member

    Messages:
    1,059
    Likes Received:
    0
    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.
     
  11. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    Thank you. I got it