Installing FreeBSD Using Remote SSH Session

Home / Installing FreeBSD Using Remote SSH Session

Installing FreeBSD Using Remote SSH Session

December 9, 2015 | Article | No Comments

FreeBSD is a powerful open-source operating system based on BSD Unix and developed by a large scale community.

You can install FreeBSD using direct access to a machine. This means, you have physical access to the machine such as operate keyboard, see the display on monitor directly, etc. In short, you are not using any medium to install and configure your machine. This is normal circumstance. But there is another method we can do, instead of installing FreeBSD by using physical access we can do indirect installation. The method we discuss is installation using remote SSH session. This article will cover how to do it.

Of course, you still need a Live CD (or live CD image, if you install for Virtual Machine). The one I use is FreeBSD-9.10RELEASE-amd64-dvd1.iso. Other than that, I use VirtualBox 4.2.6 for testing.

Despite of the fact we use virtual machine, this method should work on any machine.

Intro & Preparation

Boot the DVD (or the ISO). A bunch of text will appear in front of you. Ignore it if it doesn’t give you error.

On the welcome screen, you will have three options: < Install >, < Shell >, and < Live CD >. Choose the < Live CD > option. You will then be brought to a login screen (in CLI mode, of course). Enter “root” as username and no password required.

If you use non-English keyboard, invoke “sysinstall” tool to configure your keyboard mapping. In sysinstall, go to “Configure / Console / Keymap”.

If you use VirtualBox, VMWare, or other virtualization, make sure you have your machine connected with Bridged adapter (or something like that) not under NAT. This way, you can directly access your machine because the IP address will be on the same network as you.

Temporary /etc

Before starting SSH daemon, we have to create a writeable /etc space. We are using unionfs so that we could write on top of non-writable disk.

mkdir /tmp/etc
mount_unionfs /tmp/etc /etc

SSH Configuration

Configure SSH daemon to allow remote login.

ee /etc/ssh/sshd_config

Find a line with “PermitRootLogin” and make sure it was written like this:

PermitRootLogin yes

Then start the daemon.

/etc/rc.d/sshd onestart

You should also set the root password so that you can login.

passwd root

Network Configuration

There are two ways to configure network: manual configuration, automatic configuration.

Manual Configuration

This way, you want to configure IP address and other stuff manually. This is useful if you don’t have DHCP server in network. What you need is the free/unused IP address on your network, the netmask, and the default gateway on network.

Suppose you want to use as your machine’s address with netmask or /24 and the gateway

ifconfig em0 inet netmask up
route add default

Automatic Configuration

This way, you want to configure IP address and other stuff automatically. This method rely on DHCP server in network, either by your router, or another specific machine.

dhclient em0

How to Connect

You can connect to soon-to-be-installed-with-FreeBSD machine by using usual ssh connection. For example you are using Linux:

ssh [email protected]

Then, you can continue to installation process by invoking



About Author

about author


A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Share Buttons and Icons powered by Ultimatelysocial