PDA

View Full Version : sshd, prng not seeded, X Login (kde)



smtm
09-13-2003, 09:33 AM
Hi , I have knoppix 3.1 installed on HD ct CD). Last week I played around with APM to get the fan on the graphics card to wind down and set the computer in such a suspend mode that i could not reawake it. So the only option was a hard boot. (unfortunate windows habit). after that at the next reboot i had a whole lot of fsck yes, yes y y y y type of loops.

Now I an only get to the graphical X login screen, but when I try to log in nothing happens. I found out that my sshd is not working. by checking dmesg. I assume that X and kde needs sshd. When I type sshd I get the ansewer "prngd not seeded". I checked all kinds of websites (open ssl) but there are no real practical solutions. I dont want to get into hardcore cryptography (yet) to log onto my system. There is a lot of talk about entropy and random generators.

Any practical solution would be greatly appreciated! Such as apt-get install something that would work.

I am also thinking about doeing a complete reinstall, bat taht would be the last resort.
Thank you ,ro

JoDaY
09-13-2003, 05:48 PM
hello,

I don't think you need sshd to login.

Have you tried to boot in another runlevel:

At lilo prompt: press Tab, then press Linux 2 (runlevel 2)

Once you're logged, you can try: startx (to start x server)

You may also try to login you as root in order to run fsck to check your partition.

Dave_Bechtel
09-13-2003, 10:58 PM
--You could look into ssh-keygen, but after a bad fsck like that I would seriously reinstall - and next time use a journaled filesystem like reiserfs or ext3.


Hi , I have knoppix 3.1 installed on HD ct CD). Last week I played around with APM to get the fan on the graphics card to wind down and set the computer in such a suspend mode that i could not reawake it. So the only option was a hard boot. (unfortunate windows habit). after that at the next reboot i had a whole lot of fsck yes, yes y y y y type of loops.

Now I an only get to the graphical X login screen, but when I try to log in nothing happens. I found out that my sshd is not working. by checking dmesg. I assume that X and kde needs sshd. When I type sshd I get the ansewer "prngd not seeded". I checked all kinds of websites (open ssl) but there are no real practical solutions. I dont want to get into hardcore cryptography (yet) to log onto my system. There is a lot of talk about entropy and random generators.

Any practical solution would be greatly appreciated! Such as apt-get install something that would work.

I am also thinking about doeing a complete reinstall, bat taht would be the last resort.
Thank you ,ro

smtm
09-14-2003, 11:00 AM
I tried the ssh-keygen and got the same answer:(prngd not seeded).

Before I reinstall, is there a quick way to get a listing of all files/ packages that i have installed/modified on the current system? I guess I would want a "find" with some options. Or is there a apt- soemting command that tells me which files i have installed since setting up the system.

Stephen
09-14-2003, 07:43 PM
I tried the ssh-keygen and got the same answer:(prngd not seeded).

Before I reinstall, is there a quick way to get a listing of all files/ packages that i have installed/modified on the current system? I guess I would want a "find" with some options. Or is there a apt- soemting command that tells me which files i have installed since setting up the system.

Use dpkg --get-selections > selections.txt to get your currently installed packages. Once you re-install then dpkg --set-selections < selections.txt to restore the saved selections to the package system. Then dselect update to update the database and apt-get dselect-upgrade to perform an upgrade using the the restored packages list. You may want to save /etc or the configuration files you modified and restore these as well.

Dave_Bechtel
09-15-2003, 04:20 AM
--That's good info, Stephen. In fact I'm going to incorporate that into my bkpcrit script. :)

--Here's a couple methods of finding and sorting all files that have been modified:

o Quick-n-dirty, limited utility:
' ls -tARGg / |less '

--I was going to post a "find" way based on experimentation, but couldn't find a good way to do it in a short amt of time. I was actually going to give up on it but googled ' incremental backup using "find" ' at the last minute. :)

--Adapted from http://www.siwawi.arubi.uni-kl.de/mitarbeiter/pers/software/ssh_backup.html:

' touch -t 200305050000 ~/compfile ' == Create file with desired "newer-than" date for comparison; this file is May 5, 2003, midnight. You can change the date to that of your Knoppix rev.

' find / -xdev -newer ~/compfile ! -type d -print ' == Don't descend into other mounted filesystems, and exclude directory entries

o My "Backup critical files" script... Use whenever you make changes to critical files, especially in /etc. Minimum recommended usage is once every Friday. (Note - all my directories in /mnt have a 0-byte file named NOTHERE in them that disappears while something is mounted there. You can either comment out the -e test for the NOTHERE file inthe script, or ' touch /mnt/blah/NOTHERE ' when nothing is mounted to that dir, to create the file.)

#BEGIN bkpcrit


#!/bin/sh
# Backup critical files (hopefully)

dest='/mnt/zippy'
mount $dest

[ -e "$dest/NOTHERE" ] && echo "$dest NOT MOUNTED" && exit 99

# "If" checking for NOTHERE file...

dest=$dest'/linux-p233-knoppix32'
echo $dest = PK
read

mkdir $dest

# Copy this bkp script to zippy
cp $0 $dest
cp ~/localinfo.dat $dest

dpkg --get-selections > ~/dpkg-selections.txt
## To get your currently installed packages. Once you re-install then:
# dpkg --set-selections < dpkg-selections.txt
## To restore the saved selections to the package system.
#
## Then
# dselect update
## To update the database and
# apt-get dselect-upgrade
## To perform an upgrade using the the restored packages list.

time {
tar cpvzf $dest/bkp-ETC-debian.tar.gz /etc
tar cpvzf $dest/bkp-DEV-debian.tar.gz /dev
tar cpvzf $dest/bkp-rootbin-debian.tar.gz /root
tar cpvzf $dest/bkp-davesrc-debian.tar.gz /home/dave/src
tar cpvzf $dest/bkp-davebin-debian.tar.gz /home/dave/bin
tar cpvzf $dest/bkp-usr-local-debian.tar.gz /usr/local
tar cpvzf $dest/bkp-var-dpkg-status.tar.gz /var/lib/dpkg
tar cpvzf $dest/bkp-var-dpkg-backups.tar.gz /var/backups

# Dotfiles
cd /root
tar cpvzf $dest/bkp-root-dotfiles--restore-locally.tar.gz .[^.]*
cd /home/dave
tar cpvzf $dest/bkp-dave-dotfiles--restore-locally.tar.gz .[^.]*
}

ls $dest -al
df $dest
exit

#/var/adm/inst-log

Copyright (C) 1999, 2000 and beyond David J Bechtel

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The GNU Copyleft (http://www.gnu.org/copyleft/gpl.html)





I tried the ssh-keygen and got the same answer:(prngd not seeded).

Before I reinstall, is there a quick way to get a listing of all files/ packages that i have installed/modified on the current system? I guess I would want a "find" with some options. Or is there a apt- soemting command that tells me which files i have installed since setting up the system.

Use dpkg --get-selections > selections.txt to get your currently installed packages. Once you re-install then dpkg --set-selections < selections.txt to restore the saved selections to the package system. Then dselect update to update the database and apt-get dselect-upgrade to perform an upgrade using the the restored packages list. You may want to save /etc or the configuration files you modified and restore these as well.

aay
10-03-2003, 04:00 AM
Use dpkg --get-selections > selections.txt to get your currently installed packages. Once you re-install then dpkg --set-selections < selections.txt to restore the saved selections to the package system. Then dselect update to update the database and apt-get dselect-upgrade to perform an upgrade using the the restored packages list. You may want to save /etc or the configuration files you modified and restore these as well.

Stephen, this tip is worth its weight in gold. I'm installing all the apps from one of my boxes onto another as I write this. THANKS!

Adam

smtm
10-03-2003, 06:48 AM
Yes I wanted to say thanx as well for this great tip. I built this into my backup scripts which are rsync based.
They are based on the sources found at:
http://www.mikerubel.org/computers/rsync_snapshots/

Maintaining 5 daily snapshots of the most important files of 8 GB worth of data takes about 1 min each. I included the dpgk listing so i can step back if i encounter problems and want to go back to a state whcih i knew that worked.