You are not logged in.

#1 2008-08-31 20:24:28

andrew123456
Member
Registered: 2008-08-31
Posts: 32

ssh into a broken box

okay, so here's my dilemma; i've got a laptop running xubuntu and a desktop running arch. the desktop is a headless machine that i mostly use for downloading and storing files on and such. i access this machine via ssh over my little network.

now here's my problem.

just yesterday i moved off to college, and the house i'm staying in has wireless internet. so i popped a wi-fi card into my arch-box, and opened up rc.conf and edited the network for using the wifi.
now i restarted the network on the machine without even thinking of double checking myself, and now i've got a machine that for whatever reason won't connect to the wifi and won't let me connect to it via wired network either.

i have no extra monitor or anything, and i was thinking the easiest way would be to get a live cd (of any distro, really) that has ssh built-in and enabled so i can ssh-in, mount the harddrive and edit rc.conf again.

my search for such a disc has been a bit frustrating, and my only lead seems to be larch, but after reading some of the documentation i'm just more confused. does anyone have any ideas for me?

Offline

#2 2008-09-01 01:12:10

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: ssh into a broken box

I just recently installed a gentoo system over ssh using the gentoo minimal instal cd (install-x86-minimal-2008.0.iso about 80MB). On startup you are already logged in as root so you first need to change the root password. Then start ssh with " /etc/init.d/sshd start " (minus quotes). Bear in mind the live cd uses dhcp to get its ip address.
You can also do the same with the Arch cd but its been a while since I used it that way and I'm not sure of the procedure.

Offline

#3 2008-09-01 01:42:25

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: ssh into a broken box

He needs a livecd of a distro that gets an IP address over DHCP and fires up a SSH server by default so he can revive his headless box, so the gentoo disk won't help any. Unless you could get a keyboard and try to do it blind.

If it were me, I would just borrow a monitor and keyboard, surely you have a friend you could bum one off of. Otherwise...

If you can't get a monitor, get a $10 keyboard, I highly recommend the Logitech Classic Keyboards. If you run the LiveCD on your laptop to figure out the exact keystrokes to get a running SSH server, you can get in.

Could you hook the headless box to a TV? Could you haul it over to a friend's dorm/apartment and hook it up there (if you can't borrow a monitor)?

Last edited by arew264 (2008-09-01 01:43:12)

Offline

#4 2008-09-01 02:52:05

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: ssh into a broken box

arew264 wrote:

He needs a livecd of a distro that gets an IP address over DHCP and fires up a SSH server by default so he can revive his headless box, so the gentoo disk won't help any. Unless you could get a keyboard and try to do it blind.

The gentoo disk will start DHCP and will get an IP address. Assuming he has access to a keyboard then its as easy as I described.
Two commands to type in blind and off you go!

Offline

#5 2008-09-01 03:44:38

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: ssh into a broken box

my0pic wrote:
arew264 wrote:

He needs a livecd of a distro that gets an IP address over DHCP and fires up a SSH server by default so he can revive his headless box, so the gentoo disk won't help any. Unless you could get a keyboard and try to do it blind.

The gentoo disk will start DHCP and will get an IP address. Assuming he has access to a keyboard then its as easy as I described.
Two commands to type in blind and off you go!

Bringing up the network blindly works too smile

IIRC, the latest arch installer does try to bring up the network with dhcp (a simple dhcpcd eth0 might do otherwise).

Live cds don't come with sshd running, since without having a unique login, that could be quite insecure and nasty.

So if it has to happen without a keyboard, either look into remastering an existing iso to add sshd to start by default (and the required hosts.allow, and maybe some more configuration). Larch does work, and it does have some documentation as to having it generate a livecd that runs sshd.

Offline

#6 2008-09-01 05:14:32

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: ssh into a broken box

Have you checked with the router to see if it has issued an IP address to the box?  If it has then you should be able to ssh into that IP address I would have thought. Assuming that the IP range is the same as the original network ofc.

Offline

#7 2008-09-02 00:09:52

andrew123456
Member
Registered: 2008-08-31
Posts: 32

Re: ssh into a broken box

thanks for all the tips guys, i hadn't really thought of doing it blindly.

i did, however come across something that does what i need it to do;

http://www.easylivecd.com/english/cdrouter/

it's supposed to function primarily as a router, but ssh comes pre-configured to with root:cdrouter@192.168.1.1
all i need to do is give my laptop a static ip, then i can ssh in, and cd to /mnt/hda3/etc/ and edit rc.conf.

thanks for the tips guys.

Offline

Board footer

Powered by FluxBB