Install Gentoo: ssh into the livecd (bootable USB)

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Goal

Task: install Gentoo using the official Gentoo livecd from another computer.

Documentation

Bootable media
https://wiki.gentoo.org/wiki/Bootable_media
Downloads
https://www.gentoo.org/downloads/

Gentoo handbook: Choosing the right installation medium
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media
Includes:
- Getting a bootable USB
- Booting the target system with the USB.

Gentoo handbook: Configuring the network
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking

SSH into the liveCD

Boot

Boot the target system using a live CD or bootable USB. See available documentation above.

Root password

Change the root password:

livecd / # passwd root
New password:
Retype new password:
passwd: password updated successfully

SSHD

livecd / # rc-service sshd status
* status: stopped

Start the sshd service:

livecd / # rc-service sshd start
ssh-keygen: generating new host keys: RSA ECDSA ED25519
* Starting sshd ...                                                                                    [ ok ]

Start the network

Find the name of the network interface:

livecd / # ifconfig
enp11s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.70  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::6f21:8954:7670:cca6  prefixlen 64  scopeid 0x20<link>
        ether 74:56:3c:bd:e1:05  txqueuelen 1000  (Ethernet)
        RX packets 3754  bytes 4123005 (3.9 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 1970  bytes 235504 (229.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xa0100000-a01fffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 288  bytes 22824 (22.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 288  bytes 22824 (22.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp12s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e2:92:49:a9:de:ed  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

In the above example, we are going to use the wired connection enp11s0, which is connected to the LAN router.

Start dhcpcd on the above interface:

livecd / # dhcpcd enp11s0
dhcpcd-10.0.5 starting
DUID 00:01:00:01:2d:48:20:60:74:56:3c:bd:e1:05
enp11s0: IAID 3c:bd:e1:05
enp11s0: soliciting an IPv6 router
enp11s0: soliciting a DHCP lease
enp11s0: offered 192.168.1.70 from 192.168.1.1
enp11s0: leased 192.168.1.70 for 86400 seconds
enp11s0: adding route to 192.168.1.0/24
enp11s0: adding default route via 192.168.1.1

Note the LAN address: 192.168.1.70

SSH into the livecd

Now, you are ready to SSH into the livecd from another computer in the LAN network:

$ ssh  root@192.168.1.70
The authenticity of host '192.168.1.70 (192.168.1.70)' can't be established.
ED25519 key fingerprint is SHA256:ORPqXAuDDK7YnHR1/gFZOJt54KW+mn+rm+M+Twa20EA.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.70' (ED25519) to the list of known hosts.
(root@192.168.1.70) Password:
Welcome to the Gentoo Linux LiveCD!

The root password on this system has been auto-scrambled for security.

If any ethernet adapters were detected at boot, they should be auto-configured
if DHCP is available on your network.  Type "net-setup eth0" to specify eth0 IP
address settings by hand.

Check /etc/kernels/kernel-config-* for kernel configuration(s).
The latest version of the Handbook is always available from the Gentoo web
site by typing "links https://wiki.gentoo.org/wiki/Handbook".

To
start an ssh server on this system, type "/etc/init.d/sshd start".  If you
need to log in remotely as root, type "passwd root" to reset root's password
to a known value.

Please report any bugs you find to https://bugs.gentoo.org. Be sure to include
detailed information about how to reproduce the bug you are reporting.

Thank you for using Gentoo Linux!