# Private Servers Deployment

### Prerequisites

* Ensure that **SSH server** is running on your device.
* If your SSH server runs on a non-default port (not 22), update the SSH port in the Blockops UI to match.
* Ensure your deployment user does **not require a password for sudo** commands.
  * You have two options:
    1. **Create a dedicated passwordless user** for Blockops.
    2. **Allow passwordless sudo** for your user by editing the sudoers file:

       ```bash
       sudo visudo
       ```

       Add this line (replace `youruser` with your actual username):

       ```bash
       youruser ALL=(ALL) NOPASSWD:ALL
       ```

### Authentication Methods

1. Password-Based SSH Authentication: you'll need:

   1. username: the username on your device
   2. password: the password for that user
   3. port: the SSH port (default: 22)

   <br>
2. Private Key Authentication

{% hint style="info" %}
Blockops does not support passphrased private keys.
{% endhint %}

1. Create a new SSH key pair: run this command on your terminal<br>

   ```
   ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
   ```
2. When prompted:
   1. File path: Press Enter to save to default (\~/.ssh/id\_rsa)
   2. Passphrase: Press Enter to create a key without a passphrase<br>
3. Add the public key\
   Copy the contents of `~/.ssh/id_rsa.pub` into `~/.ssh/authorized_keys`

### Connecting Your Private Server to Blockops

**Log in**

* Go to [app.blockops.network](https://app.blockops.network)
* Sign in or create an account

#### Select deployment options

1. Choose the network you want to deploy
2. Select Baremetal as the cloud provider
3. In the Authentication section, check the private server field and follow the on-screen instructions.

#### Install Autossh

On your private server, install autossh:

{% tabs %}
{% tab title="MacOS" %}

```bash
brew install autossh
```

{% endtab %}

{% tab title="Ubuntu/Debian" %}

```bash
sudo apt update && sudo apt install -y autossh
```

{% endtab %}
{% endtabs %}

#### Establish the SSH Tunnel

Run this command once (to add blockops.sh:7777 to known\_hosts):

{% hint style="info" %}
You can find this command in the **Authentication** section after selecting the **Private Server** option.
{% endhint %}

```bash
sudo autossh -M 0 -R example71:22:localhost:22 blockops.sh -p 7777
```

Then, re-run the same command to establish the persistent connection

```bash
sudo autossh -M 0 -R example71:22:localhost:22 blockops.sh -p 7777
```

This creates a private, secure tunnel between your server and Blockops.

#### Deploy Your Node

Return to the Blockops UI and click Continue to finalize the connection and deploy your node.


---

# 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.blockops.network/developer/products/mission-control/node-deployment-1/private-servers-deployment.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.
