PDA

View Full Version : Create a full-auto terminal server for headless box?



Havin_it
10-28-2005, 02:03 AM
Hi,

I hope this is the right place to offer some help with my mission. I just bought a 2nd-user Dell server with 384MB RAM and P3 600MHz processor to use as home-network storage/media server. While I wait to get a monitor from somewhere, is there any way I can use a Knoppix CD (either remastered or making use of the persistent config or persistent home-dir functionality) to boot the unit, connect to the local network's ethernet router by DHCP, and launch an SSH (maybe even NX) server? I have two laptops (one Gentoo, one WinME) available on the network, and the main aim is to explore the hardware of the box (I don't know too much what's in there) prior to installing an OS.

Can anyone advise what I'd need to go about this? I have seen some posts about headless Linux searching here and elsewhere, but no actual howto that (a) still exists or (b) explains what it actually does. I currently have: a keyboard (so I could enter cheatcodes blind?); a USB key (for config outside the CD, if it can be accessed automatically); a Knoppix 3.7 CD and a ParallelKnoppix CD. (I heard about ParallelKnoppix in one of the threads my search turned up here, but I can't find any documentation telling me whether it will suit my exact needs.)

Thanks in advance!

mcreel
10-28-2005, 10:11 AM
Heh, this is amusing. If you boot the box blindly with P-KPX, you can:

* press CTRL-ALT-F2. You are logged in as root (?!)
* type cd /home/knoppix/Desktop/ParallelKnoppix/Setup/
* type ./SetupParallelKnoppix

That will configure the IP of eth0 as 192.168.0.1, and ssh will be running. Then you can ssh into the headless node using
ssh -l knoppix 192.168.0.1 The pw is "parallelknoppix"

The CD was not designed to do this, but it does work - I just tried it out.

M.

Havin_it
10-29-2005, 04:43 PM
Hi, thanks for the info. I haven't tried it yet, as I got a plan of my own before you posted it, but it failed.

I was going to use the Knoppix 3.7 CD and add an auto-starting sshd script to my .kde/Autostart folder, and save that config on my USB key. Took a while to get working with my other hardware, but I cracked it and even practiced guessing when to type the necessary 'myconfig' cheatcode.

Just one tiny problem: the FRICKEN USB KEY wasn't detected by the FRICKEN SERVER! I'm not certain why this was, but it may be a case of poor backwards-compatibility in the [USB2] device. When I use it in a USB1 port on a WinXP machine, it complains via a systray balloon, though it does work - perhaps this is just a more serious version of the same kinda adverse reaction.

In any case, the CD booted up okay as I can ping it on the network, but that's all.
Any other ideas?

PS, can I shutdown Knoppix via keyboard shortcuts? I don't wanna have to pull the plug...

PPS - there seems to be an FTP server running. Is this normal?

Havin_it
10-31-2005, 04:18 AM
I found a way to do this with the Knoppix 3.7 CD eventually, and it is quite similar to what you suggested above.

1) I let Knoppix boot to the default, then issue CTRL+ALT+F2 (root shell)
2) Type (carefully!) passwd root <Enter> [password] <Enter> [password] <Enter>
3) /etc/init.d/sshd start

I did not think this would actually work after I had so many problems with attempting to preconfigure SSHD before, but it was fine. The password does have to be set - default blank root-password doesn't work, maybe a good thing too in most circumstances! - but after that it's easy to connect via PuTTY, WinSCP, whatever.

I think, with a headless alien machine (where you don't know either the boot options or typical boot-prompt delay), this is a lot better of an option than trying to guess when to type a cheatcode.

However, it's still not optimal. What if I didn't have a keyboard either? Now, I can understand that with *nix being inherently security-minded, there may not seem a case for an auto-booting CD with unprotected servers galore. Nowadays though, with the NAT'd home network becoming more prevalent, I think this is something that people could really use. And if I ever figure out how to do it, I'll post it here ;)

Now... how can I setup the NX server from the command-line?

mcreel
11-02-2005, 09:42 AM
When you ping the box, what is it's IP address? I didn't think it would have an IP address set right after booting.

If you don't have a keyboard, then you could remaster P-KPX to autorun the SetupParallelKnoppix script, so networking would be configured and ssh would be running. There was a thread a while ago about "headless knoppix" that probably has more information.

Harry Kuhman
11-02-2005, 10:06 AM
When you ping the box, what is it's IP address? I didn't think it would have an IP address set right after booting.
It certainly should if there is a DHCP server on the network (like those in all common home routers).