lkml.org 
[lkml]   [2002]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectssh won't work from initial ram disk in 2.4.18
Date
I'm using a 2.4.18 kernel and ssh 3.0.2, and I'm trying to run ssh from the 
initrd, and it's refusing to work. The exact same setup works booted from a
small partition, but if I take a tarball of that filesystem and dump it into
a ramdisk, ssh always fails to authenticate. (Public key or password, it
doesn't matter. When I run it from sh in initrd, it doesn't even prompt me
for a password, just prints out three failure messages and exits. The same
setup from /dev/hda1 works just fine...)

Both filesystems (/dev/hda1 and the initrd.img) are formatted ext3. (Because
ext2 support is a seperate driver I'd have to compile in, the journal size is
1 meg. The initrd is 16 megs, and yes I upped the default ramdisk size to 16
megs. The box itself has 128 megs of ram.) Modules are disabled.

(In case you're wondering, I'm running dhcpcd, which is happy, followed by a
variant of "ssh 10.0.0.1 cat yourbrain.sh | /bin/bash". The reason I need to
make it run from a ramdisk is that the script I'm trying to suck accross will
repartion the box, format the partitions, and untar a big tarball into it.
It's quick and dirty a system manufacturing thing. sfdisk won't reread the
partition table if you have any partitions from the drive, and a reboot
between "partition" and "format" stages is, um, problematic.)

As I said, it works fine when it's NOT running from an initial ramdisk. ssh
connects and has no problem transferring data. But from a ramdisk, instant
failure, either password or public key pair. I don't even get to ENTER my
password. (Run /bin/bash and try to ssh as root. It WILL prompt me about
the box's fingerprint not being recognized, but it immediately goes
"Permission denied, please try again." three times for the password without
lettiing me type anything.)

If this is an ssh problem I'll be happy to go bug those guys, but why would
it be different from initrd than from an actual mounted partition?
(Permissions are the same, I checked.)

If somebody wants a tarball of this test case, drop me an email. It's only a
couple megabytes...

Rob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.047 / U:11.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site