🛠 Ethernet Gigabit et accès SSH sécurisé
Objectives
Install the ODROID-C4 as a headless server: configure its Gigabit Ethernet port (SoC MAC + Realtek RTL8211F PHY), assign it a fixed local IP address, and install and secure the SSH daemon. Important point: the board has no built-in Wi-Fi or Bluetooth — Ethernet is the default path (optional mSOTA+ module or USB dongle).
Hardware
- ODROID-C4 running Armbian current (minimal headless image)
- RJ45 Ethernet cable to the box/router
- Another computer for the SSH session
- First connection also possible via HDMI + keyboard or UART console at 115200
Complete code
#!/usr/bin/env bash
# 1) Vérifier le lien et la vitesse (le port est 1000BASE-T)
sudo apt install -y ethtool openssh-server
sudo ethtool eth0 | egrep 'Speed|Link' # attendu: 1000Mb/s full duplex
ip -br a # noter l'IP donnée par le DHCP
# 2) IP fixe locale (NetworkManager, exemple 192.168.1.50/24)
sudo nmcli con mod "Wired connection 1" \
ipv4.method manual ipv4.addresses 192.168.1.50/24 \
ipv4.gateway 192.168.1.1 ipv4.dns 192.168.1.1
sudo nmcli con up "Wired connection 1"
# 3) Durcir SSH : clés uniquement
ssh-keygen -t ed25519 # sur le poste client
ssh-copy-id odroid@192.168.1.50
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication no/' \
/etc/ssh/sshd_config
sudo systemctl restart ssh
# 4) Tester depuis le client
ssh odroid@192.168.1.50 'ip -br a; uptime'
Expected verification
ethtool indicates Speed: 1000Mb/s and Link: yes (the GbE port is one of the board's strengths). ping 192.168.1.50 responds from the client; the SSH connection succeeds without asking for a password (ed25519 key authentication). A ssh -v on the client side clearly shows Authenticated using publickey.
Common errors
- Looking for a
wlan0interface: there is no built-in Wi-Fi/Bluetooth on the C4; plan for the WiFi 5BK module (mSOTA+ slot) or a USB dongle. - The interface name may be
end0/eth0depending on the image: check withip -br abefore running nmcli commands. - Cutting off access methods by disabling passwords before testing the key: keep a session open until success.
- Undersized power supply causing network disconnections: use the 12 V/2 A DC jack, never the USB OTG port (not intended for power supply).
- >
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash