1834140 Members
2556 Online
110064 Solutions
New Discussion

HP-UX 11.00 SSH Issue

 
SOLVED
Go to solution
Pete G
Advisor

HP-UX 11.00 SSH Issue

I'm hoping someone can help me out with a recent problem I've been experiencing. I decided to utilize rsync through ssh to sync certain filesystems. I fixed all the errors on all the machines that were an issue with the PATH not being exported correctly for cron, etc. I have only one small problem left and that is regarding the HP-UX server that is the "source" rsync'ing to the "target". At least a few emails are generated nightly complaing about a few of the rsync jobs in crontab. The errors, although specific to a different filesystem, are all the same:

PRNG seed extration failed
ssh-rand-helper child produced insufficient data
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(453) [sender=2.6.9]
Null message body; hope that's ok

Here's the version of SSH I am running:
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090702f

As I recall, one of the last available depots for this version of the OS before support was pulled.

I am assuming this has something to with random number generation or prngd. My understanding is this isn't, unlike Solaris, built into the kernel. What would be the easiest way to correct this issue I am having?

Thanks in advance.
2 REPLIES 2
Pete G
Advisor

Re: HP-UX 11.00 SSH Issue

I should add that I have no issues running this manually or even when I come in in the morning and change the cron time to try to run it again. Just some of the jobs overnight fail and the message I pasted above writes to root's email. I know the jobs fail because on an exist condition other than 0 it sends email to a DL notifying us about it.

#!/bin/sh
PATH=/usr/bin:/usr/sbin:/usr/local/bin
export PATH

EMAIL="edited edited"
SOURCE=/data
TARGET=hostname:/

#
# run rsync
#
/usr/local/bin/rsync -ave ssh --exclude "lost+found/" --rsync-path=/usr/local/bi
n/rsync --delete $SOURCE $TARGET > /tmp/rsync_data_with_nyprodc.out

#
# check if the return code is not equal to zero
#
if [ "$?" -ne 0 ]
then mailx -s "Rsync of $SOURCE to $TARGET failed on `hostname`" $EMAIL /null
fi
Olivier Masse
Honored Contributor
Solution

Re: HP-UX 11.00 SSH Issue

You're on 11.0? Then you don't have a /dev/random and this might be the cause. I haven't seen this happen in 11i or 11iv2 yet.

I've had this a few years ago and if I remember correctly, it happened when I launched many, many automated SSH sessions one after another. My guess is that it happens when the SSH client is not able to gather enough random data to handle the key exchange.

You can insert a pause (20 seconds, maybe more) between each ssh, this might help. If pausing is not possible for you, you can install a third-party random number generator such as Prngd (free) and configure ssh to use it. There used to be an open source, /dev/random loadable kernel module for HP-UX 11.0 that some poor soul somewhere took to the challenge of writing, but I'd use Prngd anyway since it won't taint the kernel. I just googled for this module and it's still available here: http://www.josvisser.nl/hpux11-random/hpux11-random.html