# Install from SSH

This article is intended to show users how to install Arch remotely via an SSH connection. Consider this approach over the standard one in scenarios such as the following:

Setting up Arch on...

- HTPC without a proper monitor (i.e. an SDTV).
- A PC located in another city, state, country (friend's house, parent's house, etc.)
- A PC that you would rather setup remotely, for example from the comfort of one's own workstation with copy/paste abilities from the Arch Wiki.

Note: The first two steps require physical access to the machine. Obviously, if physically located elsewhere, this will need to be coordinated with another person!

## Boot from Media

Boot the target machine into a live Arch environment via the Live CD/USB image.

## Setup the Live Environment to use SSH

Note: The following commands should be executed as the root user, hence the # before the commands.

One should be logged in as root at this point. (This is the default user when running the livecd). Firstly, setup the network on the target machine. Assuming a wired connection is used, the live CD should have automatically configured the wired adapter via dhcpcd. For more info, visit configuring network. If on a wireless connection, see Wireless network configuration and WPA supplicant for details on establishing a connection to an access point.

Secondly, setup a root password which is needed for an ssh connection; the default arch password for root is empty.

    # passwd

Finally, start the openssh daemon with `sshd.service` which is included by default on the live CD.

## Connect to the Target PC via SSH

On another machine, connect to the target machine via the following command:

    $ ssh root@ip.address.of.target

From here one is presented with the live environment's welcome message and is able to administer the target machine as-if sitting at the physical keyboard.

    $ ssh root@10.1.10.105
    root@10.1.10.105's password:
    Last login: Thu Dec 23 08:33:02 2010 from 10.1.10.200
    [root@archiso ~]#

### Notes

- If the target machine is behind a firewall/router, the default ssh port of 22 will obviously need to be forward to the target machine's LAN IP address. The use of port forwarding is not covered in this guide.
- One can edit `/etc/ssh/sshd_config` on the live environment prior to starting the daemon for example to run on a non-standard port if desired.

## Next steps

If the intent is to simply install Arch from the live media, follow the guide at Installation guide. If the intent is to edit an existing Linux install that got broken, follow the Install from existing Linux wiki article.

Categories:

- Getting and installing Arch
- Secure Shell