SSH Setup in Companion Computer and Remote Computer
This tutorial is referenced to the ardupilot.org
SSH is necessary ,otherwise the ROS and program on Raspberry are unobservable during the flight.
First, connect both computers to the same LAN (eg: same WIFI network).
Setup
In Your Raspberry Pi
Check the IP address of the device by open a terminal and type:
ifconfig
Install OpenSSH Server
sudo apt-get install openssh-server openssh-client
Enable SSH service on Raspberry Pi
raspi-config
then select allow ssh
In Your Remote Computer
Check the ip address of the device by open a terminal and type:
ifconfig
Install OpenSSH Server
sudo apt-get install openssh-server openssh-client
Check the Connection
In Your Raspberry Pi
Open a terminal, type:
ping <ip address of remote computer>
In Your Remote Computer
Open a terminal, type:
ping <ip address of Raspberry Pi>
Define Name for Devices
Open a terminal, type:
sudo nano /etc/hosts
Then, type the ip address address and hostname into the file with format <ip address> <hostname>
192.168.xx.xxx pi-name
Such that the IP address can be simplified to a name when using SSH service
Connect the Raspberry Pi
In Your Remote Computer
Open a terminal, type:
ssh <user name>@<device name>
OR
ssh <user name>@<ip address of Pi>
If login is successful, resources on Rasbperry Pi will be accessible from the remote computer.
Type exit
to the terminal to exit the SSH server.
Notice that you need to login again for every new terminal.