Results 1 to 10 of 26

Thread: SSH not starting on reboot

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Beans
    5

    Re: SSH not starting on reboot

    Quote Originally Posted by CharlesA View Post
    How did you configure sshd_config?
    I just replaced port 25 with my new port and replaced ListenAddress 123.123.123.123 to my new IP eg.
    Code:
    Port 30002
    #ListenAddress ::
    ListenAddress 345.345.345.345
    Protocol 2
    and I set my new IP up in /etc/network/interfaces as so

    Code:
    # Automatically generated by OnApp (2.0.rc5)
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
            address 123.123.123.123
            netmask 255.255.255.128
            broadcast 123.123.123.255
            network 123.123.123.128
            gateway 123.123.123.129
    
    auto eth0:1
    iface eth0:1 inet static
            address 345.345.345.345
            netmask 255.255.255.0
            gateway 345.345.345.1
    It sounds like it's starting SSH up before networking is starting up.
    Yep that's what I figured - in fact in syslog you can see that my primary ip is started and then it tries SSH and then after avahi it starts my new interface / IP.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: SSH not starting on reboot

    Is this a desktop or server install? Avahi shouldn't be running on a server box.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Nov 2010
    Beans
    5

    Re: SSH not starting on reboot

    Quote Originally Posted by CharlesA View Post
    Is this a desktop or server install? Avahi shouldn't be running on a server box.
    It's a 10.04 Server install... It was from a standard Ubuntu 10.04 VPS image from VPS.net.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: SSH not starting on reboot

    Quote Originally Posted by lincoln6ix View Post
    It's a 10.04 Server install... It was from a standard Ubuntu 10.04 VPS image from VPS.net.
    Hrm. Maybe they set their images up differently.

    All the normal 10.04 server installs I've done, that service isn't running.

    Regardless, you wouldn't need it, since you've got a static IP set.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Nov 2010
    Beans
    5

    Re: SSH not starting on reboot

    Quote Originally Posted by CharlesA View Post
    Hrm. Maybe they set their images up differently.

    All the normal 10.04 server installs I've done, that service isn't running.

    Regardless, you wouldn't need it, since you've got a static IP set.
    I removed Avahi in the hope that it may have been the cause, but unfortunately not. It is sstill trying to get SSH to listen to an interface before it is started.

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: SSH not starting on reboot

    Quote Originally Posted by lincoln6ix View Post
    I removed Avahi in the hope that it may have been the cause, but unfortunately not. It is sstill trying to get SSH to listen to an interface before it is started.
    I guess you could always tell it to start ssh after the interface is up. Add it to /etc/network/interfaces

    Code:
    post-up service ssh start
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Jul 2010
    Location
    Los Angeles, CA
    Beans
    111
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: SSH not starting on reboot

    Quote Originally Posted by CharlesA View Post
    I guess you could always tell it to start ssh after the interface is up. Add it to /etc/network/interfaces

    Code:
    post-up service ssh start
    Charles,
    Would you expand on this a bit or point me to the documentation?

    My situation is that I have 2 interfaces one on the Internet on one on my intranet. I am using an odd-ball port on the Internet and 22 on the intranet. I know it's not real security but it cuts down on number of amateur hackers filling up my log files so I can actually see if a real threat is in there.

    Same SSH error 255 in syslog on boot and service ssh restart on the console gets everything working as desired.

    In /etc/network/interfaces all I have is setup for 127.0.0.1 will post-up wait for the other interfaces?

    As I grep through the start up files I wonder if modifying /etc/init.d/ssh might be more appropriate
    The line in the INIT INFO section:
    # Required-Start: $remote_fs $syslog

    what do you think about adding "$network $named"? I would much prefer to specify listenAddress as a hostname rather than IP address.

    Joe

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •