systemadmin.es > Storage > Sistemas de ficheros > ssh: PRNG is not seeded

ssh: PRNG is not seeded

Preparando un entorno con chroot mínimo para permitir hacer ssh a través de un host intermedio pero nada más, ha saltado el siguiente error al intentar usar ssh:

# ssh localhost
PRNG is not seeded

Si lo miramos con strace, podremos ver que necesita de /dev/urandom:

bash-3.2# strace -s 128 -fF -e open ssh google.com
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/libfipscheck.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libfipscheck.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libfipscheck.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libfipscheck.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
(...)
open("/etc/passwd", O_RDONLY)           = 3
open("/root/.ssh/config", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/ssh/ssh_config", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/dev/random", O_RDONLY|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("/dev/srandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
PRNG is not seeded

Podemos crear el dispositivo mediante mknod. Nos fijamos en el major y minor del dispositivo (o en otro si nos ocurre en nuestro propio equipo):

# ls -l /dev/urandom  
cr--r--r-- 1 root root 1, 9 Jul 16  2008 /dev/urandom

Y lo creamos dentro del chroot mediante:

# mknod /dev/urandom c 1 9

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>