It is also possible to connect to the target system using a network connection. This will normally go through an Ethernet socket on the target, but other media can be used; for example, through a serial socket using the PPP protocol. This can be more convenient than a serial connection, especially if the target board is not physically close to the host machine; however, it has the disadvantage that it involves more software and more configuration. For this reason it is not recommended for bringing up a new system.
To set up a network connection, see the Networking HOWTO Guide or How to configure Point to Point Protocol (PPP) in the How To Guide. When it is set up, connect to it using telnet, ssh or rsh protocol.
This is the most common protocol in use. By default, the distribution installs and starts a telnet daemon on the target, so a telnet session can be started immediately. For example, if the target's IP address is 192.168.1.2, then the following command connects to the target:
host% telnet 192.168.1.2 Trying 192.168.1.2... Connected to 192.168.1.2. Escape character is '^]'. STMicroelectronics Base Distribution version 2.3 Linux/sh4 2.6.23 target login:
In many environments, ssh is now the standard way to log into remote hosts. It has the advantage that all communication is encrypted, making snooping virtually impossible, and has various authentication methods which can remove the need for passwords.
As well as telnet, by default the STLinux distribution installs and starts an ssh daemon on the target. Therefore to connect to the target (where the target address is 192.168.1.2 for example) simply type:
host% ssh -l root 192.168.1.2 Warning: Remote host denied X11 forwarding. Last login: Mon Nov 15 14:39:22 2004 from 192.168.1.1 Linux target 2.6.11 #287 Thu Jul 21 18:03:13 BST 2005 sh4 unknown unknown GNU/Linux Welcome to STMicroelectronics Base Distribution. target#
An alternative protocol is rsh. However, this is deprecated in favor of ssh as it provides limited security. However, if you understand and accept the risks, it can be more convenient to use than ssh.
For details of rsh, see the man page.