# Indoor Autonomous Flight with Cube, ROS and Aruco Board (Ongoing)

**URL:** <https://discuss.cubepilot.org/t/indoor-autonomous-flight-with-cube-ros-and-aruco-board-ongoing/351>\
**Category:** Uncategorized\
**Created:** [1 April 2019 10:09 UTC](https://discuss.cubepilot.org/t/indoor-autonomous-flight-with-cube-ros-and-aruco-board-ongoing/351 "2019-04-01T10:09:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [2 April 2019 09:09 UTC](https://discuss.cubepilot.org/t/indoor-autonomous-flight-with-cube-ros-and-aruco-board-ongoing/351/6 "2019-04-02T09:09:26Z")

</div>

# SSH Setup in Companion Computer and Remote Computer

This tutorial is referenced to the [ardupilot.org](http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html)

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:

```auto
ifconfig 

```

Install `OpenSSH Server`

```auto
sudo apt-get install openssh-server openssh-client

```

Enable SSH service on Raspberry Pi

```auto
raspi-config

```

then select `allow ssh`

##### In Your Remote Computer

Check the ip address of the device by open a terminal and type:

```auto
ifconfig 

```

Install `OpenSSH Server`

```auto
sudo apt-get install openssh-server openssh-client

```

### Check the Connection

##### In Your Raspberry Pi

Open a terminal, type:

```auto
ping <ip address of remote computer>

```

##### In Your Remote Computer

Open a terminal, type:

```auto
ping <ip address of Raspberry Pi>

```

### Define Name for Devices

Open a terminal, type:

```auto
sudo nano /etc/hosts

```

Then, type the ip address address and hostname into the file with format `<ip address> <hostname>`

```auto
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:

```auto
ssh <user name>@<device name>

```

OR

```auto
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.

---

_[View the full topic](https://discuss.cubepilot.org/t/indoor-autonomous-flight-with-cube-ros-and-aruco-board-ongoing/351)._
