Connect to the BMC
There are 2 ways of logging in to your board:
- Via Serial Console
- SSH. Root login is enabled by default and exposed over the default SSH port. We recommend additional security measures if this port is reachable from outside your local network. Read more here
Serial Console
The serial console can connect to the BMC to view the system's boot process, kernel messages, and other debug information. This can be extremely useful for troubleshooting issues and understanding how the BMC firmware works and interacts with the rest of the system. Additionally, the USB to TTL converter cable will allow you to access the BMC's command line interface (CLI) and make configuration changes if necessary. The username and password are the same as for SSH access.
- User: root
- Password: turing
USB to TTL
Windows USB to TTL
Linux USB to TTL
MacOS USB to TTL
SSH
After booting up, BMC will start a standard SSH server on port 22. You can use any of your favorite SSH clients to log in.
- User: root
- Password: turing
If you have an older version of the BMC Firmware, SSH access as root is not allowed and needs to be enabled via Serial Console. You can either flash a new version of the BMC Firmware or use the Serial Console to log in and change the settings with the following one-liner:
sed -i.bkp -E 's/^#?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config && \ /etc/init.d/S50sshd restart
Increase Protection
SSH is notorious because of the numerous attacks that are attempted on it. If your system is reachable outside your local network, we recommend you take extra measures to protect your BMC.
- Disable PasswordAuthentication.
SSH keys provide better security to passwords for SSH authentication. This page has a good tutorial on how to set up key authentication. While reading this tutorial, consider client1 as your own machine and server1 as the BMC. BMC IP explains how to determine the IP address for copying the keys.
Note: Its possible to lock yourself out of SSH by performing the last step, which disables password authentication. As a tip, check that you can log in successfully with the keys before disabling password authentication. You would need to log in with a serial connection or, in the worst case, re-flash your board if you don't have a serial cable to amend sshd config.
- Disable root login
BMC IP
Some use-cases may require determining the IP address of the BMC on your network. The following steps describe the process of retrieving it, although the latest versions of the firmware do not require knowing the IP address for accessing over SSH, Web interface or the tpi tool.
mDNS
Since firmware v1.1.0, mDNS is enabled by default. This means that the board is reachable via its hostname, which is turingpi
by default. The IP address can be retrieved using the ping
command:
ping turingpi.local
Alternatively, you can find the board's IP address and firmware version in the "other" tab of the web interface. To open it, enter turingpi.local
in your browser's address bar.
Using BMC's host name is also possible for connecting via SSH (e.g. ssh [email protected]
) and the tpi tool, starting from version 2.0.0.
Conflicting host names
Host names get post-fixed with a '-' and a counter when there are multiple turing-pi's with the same host name connected to the same network. i.e. a second turing-pi would be discoverable as
turnigpi-2.local
.
Set Fixed IP
Once you are logged in, you might want to set up a fixed IP for your BMC.
In Buildroot Linux OS, you can set a fixed IP, netmask, and gateway by configuring the network settings in the root filesystem. Here are the general steps to set a fixed IP, netmask, and gateway:
Configure the network settings:
You can configure the network settings in the file /etc/network/interfaces
in the root filesystem. For example, to set a fixed IP of 192.168.1.100, netmask of 255.255.255.0, and gateway of 192.168.1.1 on the eth0 interface, you can add the following lines to the file using vi
(or nano
, since version 1.0.2) as an editor.
# interface file auto-generated by buildroot
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
pre-up /etc/network/nfs_check
wait-delay 15
hostname $(hostname)
Configure DNS settings:
You can configure the DNS settings in the file /etc/resolv.conf
in the root filesystem.
For example, setting the DNS server to 8.8.8.8
Currently the original file looks like this:
search localdomain # eth0
nameserver 1.1.1.1 # eth0
nameserver 1.0.0.1 # eth0
nameserver 4.4.4.4 # eth0
Change it to:
nameserver 8.8.8.8 # eth0
Restart the network:
After configuring the network settings, you must restart the network service. You can do this by running this command: /etc/init.d/S40network restart
Check if the IP is set correctly:
You can use commands like ip -a
, ifconfig
or route -n
to check the current IP configuration of the device, you should see that the IP, netmask, and gateway are set to the values you configured.
These settings will persist after the restart of BMC.
Updated 10 months ago