Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED) Unable to run SSH at startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
PoisonRO
n00b
n00b


Joined: 08 May 2011
Posts: 28
Location: Romania

PostPosted: Tue Jan 31, 2012 7:39 am    Post subject: (SOLVED) Unable to run SSH at startup Reply with quote

Hello all,

I have a problem as the title describes, I cannot run SSH at startup.
I've ran this command to add it at to the default runlevel

Quote:

rc-update add sshd default
* service sshd added to runlevel default


It seemed to work, but when I start my PC no ssh, and I have to run it manually.
Quote:

/etc/init.d/sshd start
* Use of the opts variable is deprecated and will be
* removed in the future.
* Please use extra_commands, extra_started_commands or extra_stopped_commands.
* Starting sshd ...


Now all it's okay. When the PC boots I only see the warnings part. No Starting sshd.

Any help on this.

Thanx,
Dan.


Last edited by PoisonRO on Thu Feb 02, 2012 12:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Tue Jan 31, 2012 9:44 pm    Post subject: Reply with quote

PoisonRO,

Please post the output of
Code:
rc-update -v show

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
PoisonRO
n00b
n00b


Joined: 08 May 2011
Posts: 28
Location: Romania

PostPosted: Wed Feb 01, 2012 8:22 am    Post subject: Reply with quote

Here is my output

Code:


            alsasound |                                                     
                  atd |                                                     
             bootmisc | boot                                                 
          consolefont | boot                                                 
           consolekit |                                                     
          crypto-loop |                                                     
                cupsd |                                                     
                 dbus |      default           
                devfs |                                               sysinit
        device-mapper | boot                                                 
               dhcpcd |                                                     
                dmesg |                                               sysinit
             dmeventd |                                                     
           fbcondecor |      default                                         
                 fsck | boot                                                 
                 fuse |                                                     
             gentoo32 |                                                     
           git-daemon |                                                     
                  gpm |                                                     
             hostname | boot                                                 
               hsqldb |                                                     
              hwclock | boot                                                 
              icecast |                                                     
             in.tftpd |                                                     
             iptables |                                                     
              keymaps | boot                                                 
            killprocs |                               shutdown               
                local |      default nonetwork
           localmount | boot                                                 
                  lvm | boot                                                 
       lvm-monitoring |                                                     
              modules | boot                                                 
             mount-ro |                               shutdown               
                 mtab | boot                                                 
             net.eth0 |                                                     
               net.lo | boot                                                 
             net.ppp0 |                                                     
             netmount |      default           
              network | boot                                                 
                  nfs |                                                     
             nfsmount |                                                     
                 nscd |                                                     
              numlock |                                                     
              openvpn |                                                     
              pciparm |                                                     
               procfs | boot                                                 
            pydoc-2.7 |                                                     
            pydoc-3.1 |                                                     
                 root | boot                                                 
           rpc.idmapd |                                                     
           rpc.pipefs |                                                     
            rpc.statd |                                                     
              rpcbind |                                                     
               rsyncd |                                                     
            savecache |                               shutdown               
                squid |                                                     
                 sshd |      default                                         
          staticroute |                                                     
                 swap | boot                                                 
              swclock |                                                     
               sysctl | boot                                                 
                sysfs |                                                     
            syslog-ng |      default           
         termencoding | boot                                                 
                 udev |                                               sysinit
           udev-mount |                                                     
       udev-postmount |      default     
              urandom | boot                                                 
                  vnc |                                                     
                 wicd | boot                                                 
       wpa_supplicant |                                                     
                  xdm | boot                                                 
            xdm-setup |                                                     
               xinetd |                             
Back to top
View user's profile Send private message
Frustie
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2007
Posts: 102
Location: My own little planet.

PostPosted: Wed Feb 01, 2012 2:39 pm    Post subject: Reply with quote

net.eth0 is not part of anything

(thats the quick answer) :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Wed Feb 01, 2012 10:22 pm    Post subject: Reply with quote

PoisonRO,

You have three network interfaces,
Code:
             net.eth0 |                                                     
               net.lo | boot                                                 
             net.ppp0 |                                                     
I'm not sure of net.ppp0 counts for this or not, as it needs another interface to be working firts.

By default, Gentoo considers the network service to be running only if all network interfaces are up.
IF the network server is not considered running, thinks that depend upon it cannot start - including ssh.

Look at the file /etc/rc.conf, near the top you will find
Code:
# Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES"
Is that hint enough ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
PoisonRO
n00b
n00b


Joined: 08 May 2011
Posts: 28
Location: Romania

PostPosted: Thu Feb 02, 2012 12:41 pm    Post subject: Reply with quote

Thanx, guys. It worked. At first I've added net.eth0 only and it did not work. After that i've deleted net.ppp0 and voila. SSH at boot.
I did not need ppp0 anyway :lol:

Cheers,
Dan.
Back to top
View user's profile Send private message
dimonic
n00b
n00b


Joined: 13 Aug 2013
Posts: 3

PostPosted: Tue Aug 13, 2013 7:30 pm    Post subject: Similar failure Reply with quote

On boot, sshd appears to start - but there is no process, and no sshd.pid in /var/run. It does claim to be already started when I try /etc/init.d/sshd start, and gives a missing /var/run/sshd.pid error when I run /etc/init.d/sshd stop.

/usr/sbin/sshd -d

works and I can login remotely.

I do not have a net.ppp0 script to delete - I just have net.eth0 and net.lo both of which appear to work. However, I have a spurious device called sit0 when I run ifconfig, for which I cannot find an init.d file.

I have also run as

/usr/sbin/sshd -e -D

which logs my logins succesfully. But - /etc/init.d/ssh start still pretends to work but doesn't.

However, when I run with

/usr/sbin/sshd -e

I get daemon failed: No such device
Back to top
View user's profile Send private message
dimonic
n00b
n00b


Joined: 13 Aug 2013
Posts: 3

PostPosted: Tue Aug 13, 2013 8:08 pm    Post subject: Solved my own problem (with help) Reply with quote

The issue is a bad /dev/null.

ls -l reveals /dev/null to be a regular file.

# rm /dev/null
# mknod /dev/null c 1 3

will fix the problem. Thanks to keex on Linuxquestions.org - 2 years ago.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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