1761375 Members
4023 Online
108901 Solutions
New Discussion юеВ

/dev/random & SSH

 
SOLVED
Go to solution
doug hosking
Esteemed Contributor

Re: /dev/random & SSH

Sorry, I didn't mean to suggest it could never work on 11.00 with enough effort; just that the currently released bits don't work on 11.00 and that there are currently no plans to backport the code to 11.00.
P.H. Vogt
Advisor

Re: /dev/random & SSH


Thanks for the install howto, but it seems not to describe the current KRNG11i package.

swlist shows
KRNG11i B.11.11.06 HP-UX 11.11 Strong Random Number Generator

However, no /dev/random or /dev/urandom

a lsdev -e 57 shows

Character Block Driver Class
57 1 dmp vxvm

Also no startup scripts in the package. Any idea how to get the /dev/random devices?
man man
H.Merijn Brand (procura
Honored Contributor

Re: /dev/random & SSH

We've just installed egd.pl on 11.00, and with little changes to the software, that almost works as /dev/random

http://sourceforge.net/projects/egd/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Mr Gorski
New Member

Re: /dev/random & SSH

Is it possible to force OpenSSH binary distribution from software.hp.com to use /dev/random ?

Michal
Tim Maletic
Valued Contributor

Re: /dev/random & SSH

Chris: your paper looks great, but what I still don't understand is the exact relationship between openssh, openssl, and the entropy source.

Your paper says: "For HP-SSH to utilize the new RNG no configuration changes need to be made to SSH." That doesn't sound right to me. Openssh's configure script attempts to find your entropy sources, and if it cannot find one, it uses its own fallback internal source. Getting openssh to recognize a new source of entropy, like a newly created /dev/urandom, will require a rebuild, unless I'm missing something.

[...tim spends hour playing with this stuff...]

OK, here's what I think happens. Openssl will detect and use a newly created /dev/[u]random at run time, even if that entropy source didn't exist at build time. But Openssh decides whether or not to use its internal entropy source at build time.

So for example, I had PRNGD running when I built openssl (0.9.6g), and then openssh (3.5p1). Now I stop prngd, and remove its socket. Openssh now stops functioning (i.e., the client dies with "Entropy collection failed" message). I then create HP's new /dev/[u]random devices, and -- whamo! -- openssh starts working again.

I suspect this is because openssh was built to use openssl's entropy, and openssl is smart enough to find the new device at run time. But if openssh was built to use its own entropy source, it will never find /dev/[u]random without a rebuild.

So the question for HP is, what entropy source does HP's SSH product use? My guess is that they'll have to ship a new product to make use of the new /dev/[u]random devices.

-Tim
Jeff Schussele
Honored Contributor

Re: /dev/random & SSH

Hi Tim,

By default, I believe HP uses the ~openssh2/etc/ssh_prng_cmds file for it's source.
It's just a list of commands and bit rates to generate the entropy.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Chris Wong
Trusted Contributor

Re: /dev/random & SSH

Once you install /dev/random, HP-SSH will start using it without making any changes. Check to make sure it is loaded:

# kmadmin -s
Name ID Status Type
=====================================================
krm 1 LOADED WSIO
rng 2 LOADED WSIO
#
If it's not loading, check /etc/rc.config.d/kminit and SAM/Kernel/Drivers and make sure rng is listed as a loadable module.
Jeff Schussele
Honored Contributor

Re: /dev/random & SSH

It should be noted that /dev/random is ONLY supported on 11i & higher.
It's not supported on 11.0 & lower.

My $0.02,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Chris Vail
Honored Contributor

Re: /dev/random & SSH

That link is dead to me, but I'd like to read your paper. Can you email it to me: cvail "at" ercot dot com?


Thanks,
Chris
Chris Wong
Trusted Contributor

Re: /dev/random & SSH

Tim,
I think you can figure out the entropy issue by looking at the files in:

/opt/ssh/src/ssh

According to the SSH O'Reilly book: SSH1 and SSH2 use a kernel-based randomness source if it is available, etc....

I think you only need to recompile if you wanted to use an add-on "randomness source", such as EGD, which is what you would need to do with 11.0.

- Chris