> ## Documentation Index
> Fetch the complete documentation index at: https://strettch-make-section-id-optional.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SC Agent

> Install the SC Agent to enable browser-based console and SSH terminal access to your Strettch Cloud compute instances on Ubuntu and Debian.

The SC Agent is a lightweight, open-source utility that enables web-based console access to your computes directly from the Strettch Cloud web console. It manages the SSH connection between your browser and the compute to provide seamless terminal access without requiring SSH client software.

**Supported Systems:** Ubuntu 20.04+, Debian 8+

View the [source code on GitHub](https://github.com/strettch/sc-console-agent)

## Automatic Installation

The SC Agent installs automatically when you create a new compute instance. No action needed—just wait a few minutes after creation, then access your console from the web console.

## Manual Installation

Need to install the agent on an existing instance? Here's how:

### Quick Install (Recommended)

Run this single command to install the agent:

<CodeGroup>
  ```bash Install the agent theme={null}
  curl -sSL https://repo.cloud.strettch.com/console/install.sh | sudo bash
  ```
</CodeGroup>

The script will automatically detect your OS, set up repositories, and install the agent:

```
--- Installing sc-console-agent for noble ---
-> Cleaning up old repository configurations...
   -> Updating package lists
   -> Installing prerequisites
   -> Downloading GPG key
   -> Adding repository
   -> Updating package index
   -> Installing sc-console-agent
...
Setting up sc-console-agent (0.1.12) ...
Configuring SC-Agent...
ℹ️  Creating required directories...
ℹ️  Downloading latest agent configuration...
✅ Agent configuration downloaded successfully
ℹ️  Enabling sc-console-agent.service...
✅ sc-console-agent.service enabled
ℹ️  Starting services...
✅ sc-console-agent.service started successfully

╔════════════════════════════════════╗
║ SC-Console-Agent Installation Done ║
╚════════════════════════════════════╝

Service Status:
  • Main Service: active
  • Auto-Update:  active

✅ sc-console-agent installed successfully!
```

### Review Before Installing

Prefer to inspect the script first? Download and review it:

<CodeGroup>
  ```bash Review the install script theme={null}
  curl -sSL https://repo.cloud.strettch.com/console/install.sh
  ```
</CodeGroup>

### Verify Installation

Check that the agent is running:

<CodeGroup>
  ```bash Check agent status theme={null}
  systemctl status sc-console-agent
  ```
</CodeGroup>

You should see `Active: active (running)`:

```
● sc-console-agent.service - SC Console Agent - Secure compute console access management
     Loaded: loaded (/etc/systemd/system/sc-console-agent.service; enabled; preset: enabled)
     Active: active (running) since Tue 2025-10-14 10:12:20 UTC; 38s ago
       Docs: https://docs.cloud.strettch.com/agents/sc-console-agent
   Main PID: 578570 (sc-console-agen)
      Tasks: 8 (limit: 9435)
     Memory: 1.9M (peak: 2.4M)
        CPU: 41ms
     CGroup: /system.slice/sc-console-agent.service
             └─578570 /usr/bin/sc-console-agent
```

Access your console from the web console within a few minutes.

To check the installed agent version:

<CodeGroup>
  ```bash Check version theme={null}
  dpkg -l | grep sc-console-agent
  ```
</CodeGroup>

## Managing the Agent

### Basic Commands

<CodeGroup>
  ```bash Start the agent theme={null}
  sudo systemctl start sc-console-agent
  ```

  ```bash Stop the agent theme={null}
  sudo systemctl stop sc-console-agent
  ```

  ```bash Restart the agent theme={null}
  sudo systemctl restart sc-console-agent
  ```

  ```bash Check status theme={null}
  systemctl status sc-console-agent
  ```
</CodeGroup>

### Auto-Start on Boot

<CodeGroup>
  ```bash Enable auto-start theme={null}
  sudo systemctl enable sc-console-agent
  ```

  ```bash Disable auto-start theme={null}
  sudo systemctl disable sc-console-agent
  ```
</CodeGroup>

## Viewing Logs

<CodeGroup>
  ```bash Live logs theme={null}
  sudo journalctl -u sc-console-agent -f
  ```

  ```bash Last hour theme={null}
  sudo journalctl -u sc-console-agent --since=1h
  ```

  ```bash Last 100 lines theme={null}
  sudo journalctl -u sc-console-agent -n 100
  ```
</CodeGroup>

## Updates

The agent updates automatically. You can also trigger updates manually:

<CodeGroup>
  ```bash Check for and install updates theme={null}
  sudo systemctl start sc-console-agent-updater
  ```

  ```bash View update logs theme={null}
  sudo journalctl -u sc-console-agent-updater -f
  ```
</CodeGroup>

## Uninstalling

To completely remove the agent:

<CodeGroup>
  ```bash Uninstall the agent theme={null}
  sudo apt-get purge sc-console-agent
  ```
</CodeGroup>

The uninstall process will stop all services and remove the agent:

```
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  sc-console-agent*
After this operation, 7,449 kB disk space will be freed.
Do you want to continue? [Y/n] Y
...
Removing sc-console-agent (0.1.12) ...
Removing SC-Agent (keeping configuration)...
Stopping sc-console-agent-update-scheduler.timer...
Stopping sc-console-agent.service...
Disabling sc-console-agent-update-scheduler.timer...
Disabling sc-console-agent.service...
SC-Agent removed (configuration preserved in /etc/sc-console-agent)
Purging configuration files for sc-console-agent (0.1.12) ...
```

**Note:** After uninstalling, console access will be unavailable. You'll need to use SSH with password authentication or SSH keys instead.

## Troubleshooting

### Console Not Accessible?

If you can't access your compute console from the Strettch Cloud web console, follow these steps:

#### Step 1: SSH into Your Virtual Machine

First, connect to your VM using SSH:

<CodeGroup>
  ```bash SSH into your VM theme={null}
  ssh -p 222 root@your-vm-ip-address
  ```
</CodeGroup>

Enter your password when prompted. Once logged in, proceed with the following steps.

#### Step 2: Verify Required Ports are Open

The console requires two ports to function:

<CodeGroup>
  ```bash Check if ports are listening theme={null}
  sudo netstat -tuln | grep -E ':(22|60124)'
  ```
</CodeGroup>

**Expected:** You should see port 22 (TCP) and port 60124 (UDP) listed as `LISTEN`

If ports are blocked by your firewall, allow them:

<CodeGroup>
  ```bash UFW firewall theme={null}
  sudo ufw allow 22/tcp
  sudo ufw allow 60124/udp
  ```

  ```bash iptables firewall theme={null}
  sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
  sudo iptables -A INPUT -p udp --dport 60124 -j ACCEPT
  ```
</CodeGroup>

#### Step 3: Check if the Agent is Running

<CodeGroup>
  ```bash Check agent status theme={null}
  systemctl status sc-console-agent
  ```
</CodeGroup>

**Look for:** `Active: active (running)` in the output

#### Step 4: Take Action Based on Status

**If the agent is not installed** (you see `could not be found`):

* Go to the [Manual Installation](#manual-installation) section above and install the agent

**If the agent is stopped** (you see `inactive (dead)` or `failed`):

<CodeGroup>
  ```bash Restart the agent theme={null}
  sudo systemctl restart sc-console-agent
  ```

  ```bash Enable auto-start on boot theme={null}
  sudo systemctl enable sc-console-agent
  ```
</CodeGroup>

#### Step 5: Test Console Access

Wait 30-60 seconds, then try accessing your console from the web console.

#### Still Not Working?

Contact support at [cloud@strettch.com](mailto:cloud@strettch.com)

## Security

The agent uses encrypted communication, cryptographic signatures, and port knocking for secure access. It runs with minimal privileges and updates automatically for security patches.
