Solved

Boot into SSH

Posted on 2014-02-27
4
631 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 28

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux ssh 4 59
LINUX CENTOS + APACHE 9 63
VLC Video Player No Longer Works after installing HandBrake, Fedora 25 5 134
Hacked File Timestamps 4 50
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

867 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

16 Experts available now in Live!

Get 1:1 Help Now