Unable to ssh to TonidoPlug with latest ArchLinuxARM

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby WarheadsSE » Mon Jul 01, 2013 3:25 pm

$this->bbcode_second_pass_code('', 'write_lease: Read-only file system')
Check your bootargs/cmdline
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby BaxterStockman » Wed Jul 03, 2013 11:30 am

Thanks, Warheads - saw that too, and was a bit suspicious. Instead of just changing the bootargs, I ended up installing a newer DENX uboot version and redoing the environmental settings entirely. I've now got ALARM on an UBIFS partition, instead of running from a USB. It's working pretty good, although it did have the ssh daemon problem.

However, that is now fixed. I found out that the problem was that all the ssh host key files were empty:

$this->bbcode_second_pass_code('', '[root@alarm ssh]# ls -Al
total 248
-rw-r--r-- 1 root root 242153 May 21 01:05 moduli
-rw-r--r-- 1 root root 1555 Jun 16 2011 ssh_config
-rw-r--r-- 1 root root 3544 Mar 26 19:25 sshd_config
-rw------- 1 root root 0 Jul 2 18:04 ssh_host_dsa_key
-rw-r--r-- 1 root root 0 Jul 2 18:04 ssh_host_dsa_key.pub
-rw------- 1 root root 0 Jul 2 18:04 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 0 Jul 2 18:04 ssh_host_ecdsa_key.pub
-rw------- 1 root root 0 Jul 2 18:04 ssh_host_key
-rw-r--r-- 1 root root 0 Jul 2 18:04 ssh_host_key.pub
-rw------- 1 root root 0 Jul 2 18:04 ssh_host_rsa_key
-rw-r--r-- 1 root root 0 Jul 2 18:04 ssh_host_rsa_key.pub
[root@alarm ssh]# cat ssh_host_key
[root@alarm ssh]#
')

Simply running $this->bbcode_second_pass_code('', 'ssh-keygen -A') didn't fix things - I had to do $this->bbcode_second_pass_code('', 'rm /etc/ssh/ssh_host*') and then ssh-keygen -A for it to work. For some reason, ssh-keygen didn't want to overwrite the empty files.

For those of you without the benefit of a serial interface, chroot into the system on a working ALARM box, delete the empty host keys, and generate new ones. Next time you boot the TonidoPlug, you should have ssh access.
BaxterStockman
 
Posts: 6
Joined: Thu Jan 17, 2013 9:12 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby WarheadsSE » Wed Jul 03, 2013 1:31 pm

Don't even have to chroot, just mount & delete, really :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby BaxterStockman » Wed Jul 03, 2013 5:36 pm

Do the keys get generated automatically on boot, or something? Because the purpose of chrooting would be to run 'ssh-keygen -A', which (apparently) doesn't have the option to set an output file (edit: makes sense, given that it outputs multiple files :) ). I suppose you could always do:

$this->bbcode_second_pass_code('', 'mount /dev/sdX /mnt
ssh-keygen -t rsa -f /mnt/etc/ssh/ssh_host_rsa_key')
And so on (as well as whatever needs to be done for proper ownership of the keys). That might be whatcha gotta do if you don't have a second box to do the chroot on, anyway.

Also, any ideas on why the key files were empty?
BaxterStockman
 
Posts: 6
Joined: Thu Jan 17, 2013 9:12 pm

Previous

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 13 guests