OpenQNX :: The QNX Community Portal

Dec 01, 2008 - 06:34 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 19 unlogged users and 3 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Robert Duncan
Post subject: sshd wont start automatically during startup  PostPosted: Jun 29, 2004 - 07:16 AM
Guest





I cannot get sshd to start at boot time on 6.3.

I have the line to start it in /etc/rc.d/rc.local ( /opt/sbin/sshd -f
/etc/openssh/sshd_config )
There are other deamons in rc.local ( syslogd and smbd etc ) that start with
no problem
I can start sshd manually once the system is booted, and it works perfectly
There is nothing in /var/log/syslog ( no error, nothing!, and the config
file is set sshd has a log level of DEBUG )
There are no other log files that i can see that indicate any problem
There are no error messages during boot after 'Running extra services'
I had an almost identical setup with 6.2.1 that worked, only difference was
that sshd was in /usr/sbin

Any ideas why it wont start ??
Is there some other way to start things automatically ??

Regards,
Robert Duncan

PS. some system info:
QNX hostname 6.3.0 2004/04/29-21:23:19UTC x86pc x86
OpenSSH 3.7.1p1
 
   
Reply with quote Back to top
Mario Charest
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 29, 2004 - 03:14 PM
Guest





Does rc.local has +x bit set.

"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cbr2pu$l79$1@inn.qnx.com...
Quote:
I cannot get sshd to start at boot time on 6.3.

I have the line to start it in /etc/rc.d/rc.local ( /opt/sbin/sshd -f
/etc/openssh/sshd_config )
There are other deamons in rc.local ( syslogd and smbd etc ) that start
with
no problem
I can start sshd manually once the system is booted, and it works
perfectly
There is nothing in /var/log/syslog ( no error, nothing!, and the config
file is set sshd has a log level of DEBUG )
There are no other log files that i can see that indicate any problem
There are no error messages during boot after 'Running extra services'
I had an almost identical setup with 6.2.1 that worked, only difference
was
that sshd was in /usr/sbin

Any ideas why it wont start ??
Is there some other way to start things automatically ??

Regards,
Robert Duncan

PS. some system info:
QNX hostname 6.3.0 2004/04/29-21:23:19UTC x86pc x86
OpenSSH 3.7.1p1

 
   
Reply with quote Back to top
Robert Duncan
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 29, 2004 - 10:12 PM
Guest





Yes, rc.local is executable. The strange things is that every other program
in it is being run.

in /opt/sbin
-rwxr-xr-x 1 root bin 258612 Sep 18 2003 sshd
-rwxr-xr-x 1 root bin 1416032 Jan 17 2003 smbd

in /etc/rc.d
-rwxrwxr-x 1 root root 175 Jun 29 15:44 rc.local

Also, i can put the line "/opt/sbin/sshd" in rc.local several times, and it
makes no difference, and there are still no error messages in
/var/log/syslog.

Q: is there some way of starting sshd from inetd, as i cannot get that to
work either.

Regards,
Robert Duncan


"Mario Charest" <nowheretobefound@8thdimension.com> wrote in message
news:cbrupm$e0o$1@inn.qnx.com...
Quote:
Does rc.local has +x bit set.
 
   
Reply with quote Back to top
David Bacon
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 30, 2004 - 01:32 AM
Guest





That is very strange indeed. I also start sshd from my rc.local file. Here
are some long-shot suggestions for things to check:

- Are you sure the network is fully up (io-net has fully initialized and
created /dev/socket) by the time you start sshd?

- Are the environment variables the same in all significant ways when you
start it at the command line?

- Are you getting /opt/sbin/sshd as opposed to some other sshd when you
start it at the command line (OK, if the PATH is the same, you are Smile)

dB

"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cbsn8u$25a$1@inn.qnx.com...
Quote:
Yes, rc.local is executable. The strange things is that every other
program
in it is being run.

in /opt/sbin
-rwxr-xr-x 1 root bin 258612 Sep 18 2003 sshd
-rwxr-xr-x 1 root bin 1416032 Jan 17 2003 smbd

in /etc/rc.d
-rwxrwxr-x 1 root root 175 Jun 29 15:44 rc.local

Also, i can put the line "/opt/sbin/sshd" in rc.local several times, and
it
makes no difference, and there are still no error messages in
/var/log/syslog.

Q: is there some way of starting sshd from inetd, as i cannot get that to
work either.

Regards,
Robert Duncan


"Mario Charest" <nowheretobefound@8thdimension.com> wrote in message
news:cbrupm$e0o$1@inn.qnx.com...
Does rc.local has +x bit set.


 
   
Reply with quote Back to top
Robert Duncan
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 30, 2004 - 01:37 AM
Guest





New information:
During boot, after 'Starting extra run commands', i can see the line "PRNG
is not seeded" briefly before the login screen appears.

A quick search on the net and i found that this is due to a system not have
/dev/urandom /dev/random or the like.
I can see these files do exist, is it possible that the 'extra run commands'
in rc.local are being executed before /dev/random is created/initialized?

I still have the problem, so any ideas are appreciated.

Regards,
Robert Duncan

"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cbr2pu$l79$1@inn.qnx.com...
Quote:
I cannot get sshd to start at boot time on 6.3.

I have the line to start it in /etc/rc.d/rc.local ( /opt/sbin/sshd -f
/etc/openssh/sshd_config )
There are other deamons in rc.local ( syslogd and smbd etc ) that start
with
no problem
I can start sshd manually once the system is booted, and it works
perfectly
There is nothing in /var/log/syslog ( no error, nothing!, and the config
file is set sshd has a log level of DEBUG )
There are no other log files that i can see that indicate any problem
There are no error messages during boot after 'Running extra services'
I had an almost identical setup with 6.2.1 that worked, only difference
was
that sshd was in /usr/sbin

Any ideas why it wont start ??
Is there some other way to start things automatically ??

Regards,
Robert Duncan

PS. some system info:
QNX hostname 6.3.0 2004/04/29-21:23:19UTC x86pc x86
OpenSSH 3.7.1p1

 
   
Reply with quote Back to top
DominiX
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 30, 2004 - 06:07 AM
Guest





ici même:cbt395$a9b$1@inn.qnx.com,
Robert Duncan <no-spam.rduncan@farleylaserlab.com.au> a écrit
Quote:
New information:
During boot, after 'Starting extra run commands', i can see the line
"PRNG is not seeded" briefly before the login screen appears.


you need to setup /etc/prngd.conf
it is used to replace broken /dev/random

Quote:
A quick search on the net and i found that this is due to a system
not have /dev/urandom /dev/random or the like.
I can see these files do exist, is it possible that the 'extra run
commands' in rc.local are being executed before /dev/random is
created/initialized?

I still have the problem, so any ideas are appreciated.


try to start sshd in rc.local with
"-ddd -e 2> /somewhere/sshd.failure.log"
and you may have some more verbose result

-- dominix
 
   
Reply with quote Back to top
cdm
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jun 30, 2004 - 02:29 PM
QNX Master


Joined: Jul 05, 2002
Posts: 789

Quote:

it is used to replace broken /dev/random


How is it broken?

chris

--
Chris McKillop <cdm@qnx.com> "The faster I go, the behinder I get."
Software Engineer, QSSL -- Lewis Carroll --
http://qnx.wox.org/
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Robert Duncan
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 02, 2004 - 03:47 AM
Guest





Quote:
you need to setup /etc/prngd.conf
it is used to replace broken /dev/random

I dont actually have prngd, not that i can see. Nor did i have it in 6.2.1,
so any clues or resources on how to deal with prng and how to set up
/etc/prngd.conf would be nice.

Is PRNG packaged up inside something else other than OpenSSH, if so, what? I
can try re-install it.

Also, how do i tell if /dev/random is broken?


Quote:
try to start sshd in rc.local with
"-ddd -e 2> /somewhere/sshd.failure.log"
and you may have some more verbose result

I did something similar, and just tried that exact one too, but there is
nothing other than the "PRNG is not seeded" line.

Thanks Again,
Robert Duncan
 
   
Reply with quote Back to top
DominiX
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 02, 2004 - 07:19 AM
Guest





ici même:cbt395$a9b$1@inn.qnx.com,
Robert Duncan <no-spam.rduncan@farleylaserlab.com.au> a écrit
Quote:
New information:
During boot, after 'Starting extra run commands', i can see the line
"PRNG is not seeded" briefly before the login screen appears.

it could be a matter of openssl trouble
are you able to generate key ?
# ssh-keygen -d -f /tmp/foo -N ""

-- dominix
 
   
Reply with quote Back to top
pvbyl
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 02, 2004 - 08:05 PM
Active Member


Joined: Oct 27, 2003
Posts: 17

I have this same problem.

PRNG is not seeded. I posted a question in the 6.3 Beta group. Chris was
going to see if he could reproduce it.. Haven't heard anything yet...

I have also tried a wait for /dev/random and /dev/urandom but this doesn't
work.




"DominiX" <dominix@despamed.com> wrote in message
news:cc303c$s6i$1@inn.qnx.com...
Quote:
ici même:cbt395$a9b$1@inn.qnx.com,
Robert Duncan <no-spam.rduncan@farleylaserlab.com.au> a écrit
New information:
During boot, after 'Starting extra run commands', i can see the line
"PRNG is not seeded" briefly before the login screen appears.

it could be a matter of openssl trouble
are you able to generate key ?
# ssh-keygen -d -f /tmp/foo -N ""

-- dominix


 
 View user's profile Send private message  
Reply with quote Back to top
Robert Duncan
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 04, 2004 - 10:27 PM
Guest





Quote:
it could be a matter of openssl trouble
are you able to generate key ?
# ssh-keygen -d -f /tmp/foo -N ""

I am able to generate the keys using ssh-keygen, however, this is done
manually once the system is fully up and running. As mentioned before i am
also able to start sshd once the system is fully up too.

I tried adding a 'ssh-keygen' to /etc/rc.d/rc.local, and it also gave me the
"PRNG is not seeded" error while booting.

I am new to QNX, but to me it seems like whatever sshd needs in order to
start (openssl?), is not being loaded until after rc.local ...
 
   
Reply with quote Back to top
Robert Duncan
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 04, 2004 - 11:58 PM
Guest





Quote:
I have this same problem.

PRNG is not seeded. I posted a question in the 6.3 Beta group. Chris was
going to see if he could reproduce it.. Haven't heard anything yet...

The steps i took in order to get this problem

1. Install 6.3 from cd
2. Install a couple of apps from 3rd party cd (OpenSSH, Samba, VIM) (OpenSSL
installed automatically as a dependancy)
3. Generate Keys: /etc/openssh/genhostkeys.sh
4. Create System Log: touch /var/log/syslog
5. Modify /etc/rc.d/rc.local to include the following

#!/bin/sh
/usr/sbin/syslogd
/opt/sbin/sshd
/usr/sbin/inetd

6. Reboot ...

During boot you see
...
Starting extra run commands
PRNG is not seeded


I have now tried this procedure with 6.3 PE and SE, both do the same.
I dont see how this is hardware related, but i will be trying on another box
when its ready.
 
   
Reply with quote Back to top
pvbyl
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 05, 2004 - 02:41 PM
Active Member


Joined: Oct 27, 2003
Posts: 17

I've done the same except for creating or running the syslog.


"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cca3a3$8on$1@inn.qnx.com...
Quote:
I have this same problem.

PRNG is not seeded. I posted a question in the 6.3 Beta group. Chris
was
going to see if he could reproduce it.. Haven't heard anything yet...

The steps i took in order to get this problem

1. Install 6.3 from cd
2. Install a couple of apps from 3rd party cd (OpenSSH, Samba, VIM)
(OpenSSL
installed automatically as a dependancy)
3. Generate Keys: /etc/openssh/genhostkeys.sh
4. Create System Log: touch /var/log/syslog
5. Modify /etc/rc.d/rc.local to include the following

#!/bin/sh
/usr/sbin/syslogd
/opt/sbin/sshd
/usr/sbin/inetd

6. Reboot ...

During boot you see
..
Starting extra run commands
PRNG is not seeded


I have now tried this procedure with 6.3 PE and SE, both do the same.
I dont see how this is hardware related, but i will be trying on another
box
when its ready.


 
 View user's profile Send private message  
Reply with quote Back to top
David Bacon
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 05, 2004 - 04:19 PM
Guest





I don't know why the pseudo-random number generator (at least I
assume that's what PRNG stands for) has not yet "seeded" itself
by the time you try to start sshd in your /etc/rc.d/rc.local
file, but an easy workaround is just to put a "sleep" before the
/opt/sbin/sshd line.

The problem was easy to reproduce using QNX 6.3.0 under VMware,
so I also do not suspect a hardware problem. The only number of
seconds I've tried so far for the sleep is 5, which worked the
first time in this environment.

I hate to see sleeps in startup scripts - perhaps there is
something to which "waitfor" can be applied, but I don't know
what it would be (it ain't /dev/random, which already exists by
the time rc.local starts).

dB

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Paul Vander Byl" wrote ~ Mon, 5 Jul 2004 10:41:38 -0400:
Quote:
I've done the same except for creating or running the syslog.


"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cca3a3$8on$1@inn.qnx.com...
I have this same problem.

PRNG is not seeded. I posted a question in the 6.3 Beta group. Chris
was
going to see if he could reproduce it.. Haven't heard anything yet...

The steps i took in order to get this problem

1. Install 6.3 from cd
2. Install a couple of apps from 3rd party cd (OpenSSH, Samba, VIM)
(OpenSSL
installed automatically as a dependancy)
3. Generate Keys: /etc/openssh/genhostkeys.sh
4. Create System Log: touch /var/log/syslog
5. Modify /etc/rc.d/rc.local to include the following

#!/bin/sh
/usr/sbin/syslogd
/opt/sbin/sshd
/usr/sbin/inetd

6. Reboot ...

During boot you see
..
Starting extra run commands
PRNG is not seeded


I have now tried this procedure with 6.3 PE and SE, both do the same.
I dont see how this is hardware related, but i will be trying on another
box
when its ready.





 
   
Reply with quote Back to top
pvbyl
Post subject: Re: sshd wont start automatically during startup  PostPosted: Jul 06, 2004 - 01:51 PM
Active Member


Joined: Oct 27, 2003
Posts: 17

Works. sleep for 5 does the trick.


Thanks!



"David Bacon" <dbacon@qnx.com> wrote in message
news:1089046273430.dB@inn.qnx.com...
Quote:
I don't know why the pseudo-random number generator (at least I
assume that's what PRNG stands for) has not yet "seeded" itself
by the time you try to start sshd in your /etc/rc.d/rc.local
file, but an easy workaround is just to put a "sleep" before the
/opt/sbin/sshd line.

The problem was easy to reproduce using QNX 6.3.0 under VMware,
so I also do not suspect a hardware problem. The only number of
seconds I've tried so far for the sleep is 5, which worked the
first time in this environment.

I hate to see sleeps in startup scripts - perhaps there is
something to which "waitfor" can be applied, but I don't know
what it would be (it ain't /dev/random, which already exists by
the time rc.local starts).

dB

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Paul Vander Byl" wrote ~ Mon, 5 Jul 2004 10:41:38 -0400:
I've done the same except for creating or running the syslog.


"Robert Duncan" <no-spam.rduncan@farleylaserlab.com.au> wrote in message
news:cca3a3$8on$1@inn.qnx.com...
I have this same problem.

PRNG is not seeded. I posted a question in the 6.3 Beta group.
Chris
was
going to see if he could reproduce it.. Haven't heard anything
yet...

The steps i took in order to get this problem

1. Install 6.3 from cd
2. Install a couple of apps from 3rd party cd (OpenSSH, Samba, VIM)
(OpenSSL
installed automatically as a dependancy)
3. Generate Keys: /etc/openssh/genhostkeys.sh
4. Create System Log: touch /var/log/syslog
5. Modify /etc/rc.d/rc.local to include the following

#!/bin/sh
/usr/sbin/syslogd
/opt/sbin/sshd
/usr/sbin/inetd

6. Reboot ...

During boot you see
..
Starting extra run commands
PRNG is not seeded


I have now tried this procedure with 6.3 PE and SE, both do the same.
I dont see how this is hardware related, but i will be trying on
another
box
when its ready.





 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.