Solved

Boot into SSH

Posted on 2014-02-27
4
623 Views
Last Modified: 2014-03-02
I'm wondering if anyone knows if there is a linux distribution which boots from USB and starts SSH straight away. My idea is to boot then install ubuntu server remotely.

I did think about trying to create a unattended installation however it reading up on it is way above my expertise :-(
0
Comment
Question by:tonelm54
4 Comments
 
LVL 13

Expert Comment

by:Sandy
ID: 39892847
boot with any disk/usb of linux distro and start the installation in text mode, easy way to achieve..

to create automated installation generate a kickstart file and use it.

TY/SA
0
 
LVL 27

Expert Comment

by:serialband
ID: 39893077
You might want to just use PXE rather than ssh.
http://www.syslinux.org/wiki/index.php/PXELINUX
0
 
LVL 26

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 39896937
various rescue cds come with sshd enabled, but since your question is about ubuntu

------

this link gives a rather complex procedure regarding how to built a custom livecd.
https://help.ubuntu.com/community/LiveCDCustomization
in your case you'd have to add sshd-server and create a user in wheel's group (or at least sudoers)

------

this is much simpler and makes use of what has been the knoppix way for years : create an usb stick with an additional persistent storage. you can boot the live distribution, install sshd, create a user, possibly an install script or whatever you need and these will be kept across reboots. you can even make a startup script that will perform an unattend installation.

https://help.ubuntu.com/community/LiveCD/Persistence
This page explains how to enhance a read-only LiveCD by adding persistent file storage on another drive. In more recent Ubuntu versions, you can instead use the usb-creator tool to create a bootable USB flash drive from a Live CD, and its user interface has an option to add persistent storage on the same USB drive; see Installation/FromUSBStick.

------

then there is a reason why most live dists don't come with ssh enabled : it does not really fit any purpoise except for some rescue cds targetted towards headless machines. what are you actually trying to achieve ?

maybe this procedure will better fit your need

-> install ubuntu on an usb key using the regular installer (do an actual regular install and not any of the tools that create bootable keys). deactivate filesystem journaling if you expect your key to last long.
-> install kickstart and configure it as needed (this is more than covered all over the web so i'm not covering it here)
-> edit your grub.cfg file and add something like "ks=hd:sdb1/ks.cfg" to the kernel parameters. (this assumes your machine has a single hard drive, your usb key is partitioned and ks.cfg is located on the root of the first partition of the usb key... adjust to fit your need)
-> you're done

you can also achieve something similar with the regular usb-creator. i'm unsure of the boot process used so i'm unsure where to stick the kernel parameters, but i'll help if you try and get stuck along the way
0
 
LVL 61

Expert Comment

by:gheist
ID: 39897881
gentoo does that...
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now