Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm looking for a live distribution (Live CD or the likes) which comes - per default - with sshd running at startup.

I want to check the components of my laptop whose graphics has died (card-replacement did not do the trick).

The system seems to boot into Knoppix 6 just right (and in typing commands w/o screen I can get it to shut down regularly) but what I need is a live distribution (CD/DVD/USB) which I can fire up and log (ssh) into over the network to check whether the CPU & memory is OK and if the new graphics card is ok too.

Anybody an idea?

share|improve this question
2  
But then you most probably could type not only 'shutdown' but also 'sshd' (and start the ssh daemon). –  elv Jul 13 '12 at 20:42
1  
You know - now that you mention it that's obvious... but I'd like to have an extra distro nevertheless - one with sshd and VNC if possible. –  Nox Jul 13 '12 at 21:22
    
I'am sure Knoppix6 livecd contains x11vnc. Besides you could also forward x11 over ssh. –  elv Jul 14 '12 at 1:15
1  
Take a USB stick that's sufficiently large, install a regular system on it, set it up the way you like, and boot it where you need it. Linux is flexible - it doesn't have to be a "Live" system at all. –  frostschutz Apr 10 '13 at 18:36

3 Answers 3

As a rule, live distributions don't come with sshd enabled, because if you can log in over sshd, so can anyone else. Your machine may be on a private network where you are the only user, but that's a rather special case. In general, to be useful, the live distribution needs to have a custom password or other authentication mechanism for every user.

You can start sshd blind, but typically that won't be enough: you'll also have to configure authentication for some account.

You should take a live distribution and customize it by making it start sshd automatically, and additionally creating a password-protected account or adding an entry to ~/.ssh/authorized_keys. Either make sure that PermitRootLogin is set to yes in /etc/sshd_config, or add a password for the root account, or make the account you can log in to a sudoer account (and give it a password).

For Knoppix, the easiest way to do this customization is to install it to a USB disk and activate its persistent memory feature (illustrated howto). Then edit the configuration files you want in /etc.

share|improve this answer
1  
This answer is correct but have a look at a blog post of mine blog.grml.org/archives/… (i was affiliated with Grml) to create a live cd which starts ssh automatically –  Ulrich Dangel Jul 15 '12 at 0:36

I came across the same problem. I decided build my own live linux (USB based).
You can configure networking via syslinux.cfg on the usb stick.
It starts openSSH by default. It comes with nearly no functionality, appart from mounting a drive and chrooting the target system.

You can download it here if you still need it http://heyn-it.de/index.php/ssh-rescue-linux.html

share|improve this answer
    
Welcome to Unix & Linux! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info. –  slm Apr 22 '13 at 19:19

Debian installer (d-i) was faced with a similar problem and their solution might be found useful. Firstly a note on the architecture of d-i: d-i is modular so by adding components in the form of udebs you can add functionality. the udebs can be added during image generation or runtime the module you are interested in is network console. if you want to install modules automatically at runtime a preseed file will do that.

Now here is how the network console module works:

  1. it gets the password to use from the local console twice (preseeding can set this beforehand or use a already hashed password.

  2. it generates a entry int he password file

  3. it generates a host key

  4. it starts sshd.

  5. it sets a hook to copy the generated host key to the installed system.

the known drawbacks to this approach are:

  1. preseeding the password is not very secure.

  2. rerunning the installer will generate a different host key.

the password problem can be mitigated by installing an authorized keys list instead of a password (and using a invalid password hash.

The relevant parts of my preseed file are:

d-i anna/choose_modules string network-console,openssh-client-udeb
#d-i anna/choose_modules seen false
d-i network-console/password password r00tme
d-i network-console/password-again password r00tme
d-i preseed/early_command string mkdir .ssh; cd .ssh; wget http://192.168.0.1/debian/authorized_keys
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.