Results 1 to 6 of 6

Thread: Knoppix-terminalserver w/ sshd on the clients

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Location
    Stockholm, SE
    Posts
    4

    Knoppix-terminalserver w/ sshd on the clients

    Hi!

    Is there an easy way to configure/modify the knoppix-terminal server files in order to let the clients booting from it have the sshd started automatically?

    I would like to use this system for remote administration (and distributing image files with nfs and partition image). Clients will get started up with a wake-on-LAN signal which makes them try network boot first.
    When booting the knoppix system remotely the sshd needs to be started so that I can reach them afterwards. Telnet would also be OK...


    And... shutting down a network-booted knoppix system will still lead to a "remove-CD" request. Can I get rid of this so the system will shut down immediately?

    Regards,
    Marcus Lantto,
    Stockholm, SE

  2. #2
    Junior Member
    Join Date
    Aug 2003
    Location
    Stockholm, SE
    Posts
    4

    Halting system

    At least I found an answer to my second question.

    Running

    # poweroff -f

    works just fine even though it will complain about unmounting a CD that doesn't exist.

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Location
    Stockholm, SE
    Posts
    4

    Solution!!

    OK... I've worked this out on my own now. I wanted to share the experience with the rest of you if there's someone who have a similar problem:

    After starting the terminal server, some changes have to be applied to the file
    linuxrc
    which is included in the image
    miniroot.gz

    And a script file called
    pass
    has to be created.



    Instructions (tested on Knoppix 3.2 but may work on earlier or later versions too):


    1. Start the terminal server with settings that are the most suitable for your network/system(s).

    2. Open a shell and write
    # su root (This isn't nessecary if you're already root!!)
    # cd /tftpboot
    # cp miniroot.gz miniroot.backup
    # gzip -d miniroot.gz
    # mkdir mr
    # mount -o loop miniroot mr
    # cd mr

    3. Now we can change the startup script:
    # emacs linuxrc

    In my file, I've inserted two lines at about line 429. It shouldn't be too critical where they are. However, it works if the two lines are inserted just before these lines:
    --------------------
    if [ -n "$SECURE" -a -f /etc/inittab.secure ]; then
    rm -f /etc/inittab
    mv -f /etc/inittab.secure /etc/inittab
    fi

    # Extremely important, init crashes on shutdown if this is only a link
    --------------------
    The lines that should be inserted look like this:

    /pass
    /etc/init.d/ssh start


    This will run the password change script and start the ssh daemon.


    4. The password change script
    The file "pass" doesn't exist so we have to create it. This will perform a password change for root automatically, i.e. the interactive part is thrown away.

    # emacs pass

    The file should look like this:
    --------------------------
    #!/usr/bin/expect

    set password secret
    spawn passwd root
    expect {
    -re "password:" {sleep 1; send "$password\r"; exp_continue}
    -re "password:" {sleep 1; send "$password\r";}
    }
    ---------------------------

    The password for root will be set to "secret". You are strongly encouraged to use one of your own, especially if you are on a public network!!!

    When finished editing the file, set the mode so it will become executable:

    # chmod 755 pass

    5. Done!! We just have to fix a compressed image file again:

    # cd ..
    # umount mr
    # gzip -c miniroot > miniroot.gz

    Answer yes if you get any questions about overwriting miniroot.gz

    6. Try it out!!






    Marcus Lantto,
    Stockholm, SE

    References:
    http://www.dit.gov.bt/~takeshi/mater...utopasswd.html
    (The password change script.)

  4. #4
    Junior Member
    Join Date
    Aug 2003
    Location
    Stockholm, SE
    Posts
    4

    Forgot to say...

    If you have many different computers that are to be started on the network and then maybe removed again, there could be problems with insufficient address space, especially on the 192.168.0.0/24 network.

    This is because of the lease time on IP-addresses. If this shows to be a problem, you could try to clear the dhcp leases file (when there are no clients on the network!!).

    # rm /var/lib/dhcp3/dhcpd.leases

    This will hopefully reset the address space and make all the addresses available again.



    When contacting a client on the network through ssh and you don't know the IP-address:

    # ping 192.168.0.255
    This is the net broadcast address for 192.168.0.0/24 and should be replaced with the broadcast address for your network.

    Interrupt with CTRL+C and have a look at the arp table:
    # arp

    or, if you know the MAC address of the client, here's an example:

    # arp | grep 10:09:6B:2D:76:36

    (Make sure you use CAPITAL letters in the MAC-address.)

    This should produce a line where the IP can be read in the first column.

  5. #5
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    I like it only 3 posts and you answered your own questions and put up a how-to.

    [edit]
    And there's a fourth while I'm posting great job Marcus!!
    [/edit]

  6. #6
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    Indeed, nice job Marcus. Now if someone can just figure out how to get clients to boot from the knoppix terminal server on a hard drive install.

    I've actually been trying to figure if there is a way to get sshd running while booting from a stock knoppix cd without remastering so as to easily start up a headless server. I got it down this weekend and will be posting a howto shortly.

    Again good job.

    Adam

Similar Threads

  1. knoppix-terminalserver wrong!
    By Omak in forum Networking
    Replies: 33
    Last Post: 06-01-2006, 11:00 PM
  2. VPN Clients on KNOPPIX
    By swan2925 in forum Networking
    Replies: 0
    Last Post: 02-25-2005, 03:57 PM
  3. Option to enable root on knoppix-terminalserver
    By paulrbarnard in forum Ideas
    Replies: 1
    Last Post: 02-05-2005, 01:46 PM
  4. TerminalServer Client with uncompressed KNOPPIX image
    By Levi37 in forum Customising & Remastering
    Replies: 0
    Last Post: 05-25-2004, 01:16 PM
  5. SECURITY WARNING ! sshd vulnerable in knoppix 3.2
    By jonatan in forum General Support
    Replies: 2
    Last Post: 06-19-2003, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox

$340.00



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$712.98



Dell Poweredge R640 Server | 2x Xeon Gold 6132 | 128GB | H730P | 8x HDD Trays picture

Dell Poweredge R640 Server | 2x Xeon Gold 6132 | 128GB | H730P | 8x HDD Trays

$1849.00



DELL PowerEdge R730XD 24x 2.5

DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED

$269.99



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$274.00



Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD picture

Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD

$79.19



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$297.00



Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores  64gb  H730  2x 750w picture

Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores 64gb H730 2x 750w

$189.99