# Access and Control

## Access

### Connect to Environment

The Flatsat can be accessed using SSH. Please email <contact@cryptosat.io> for more details.<br>

## Control

### The Local Machine

The local machine is a Debian based machine connected to the internet and to the Flatsat. This machine facilitates access to all the Crypto Engines.

#### Individual Crypto Engine Control

From the local machine terminal, you can use SSH to directly connect to a Crypto Engine. The following command will connect to the Crypto Engine 2 via SSH.

```bash
ssh ce2
```

`sftp` can be used to transfer files. Other common utilities are installed on the local computer as well.

Here is an example how to upload a file using `sftp:`

```
sftp -i .ssh/id_rsa -P [port] user@server_ip
```

#### Crypto Engine  Orchestration

**Ansible** is installed on the local machine. The `~/ansible/` directory contains the inventory and configuration files to quickly run playbooks and commands across all the Crypto Engines.&#x20;

For example, this command will run `hostname` **on all Crypto Engines**:

```bash
~/ansible $ ansible crypto_engines -a "hostname"
```

This command will run `hostname` **just on Crypto Engine 0 (ce0)**

```bash
~/ansible $ ansible ce0 -a "hostname"
```

The playbook  `copy.yml` can be used to upload files to **all** Crypto Engines

```
~/ansible $ ansible-playbook copy.yml -e "src=~/test3"
```

The target `targets` parameter can be used to specify a subset of hosts. The `dest` can be used to specify a remote path and name.

```
~/ansible $ ansible-playbook copy.yml -e "targets=ce2,ce3 src=~/test3"
```

Please refer to the Ansible [documentation](https://docs.ansible.com/ansible/latest/index.html) for more information. The Cryptosat team will be happy to assist you in creating Ansible playbooks.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptosat.io/cryptosat/flastsat-environment/access-and-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
