Ssh remote connection

From artwist-polyakov/polyakov-claude-skills · View interactive version

Ssh remote connection is an AI agent skill from the GitHub repository artwist-polyakov/polyakov-claude-skills. SSH connection to remote servers. Use when you need to execute commands on a remote server, check logs, restart services, or manage Docker containers.

How to use this skill

Skill file

SSH Remote Connection

Universal skill for connecting to remote servers via SSH.

Usage

# Interactive shell
scripts/connect.sh

# Run command directly
scripts/connect.sh "docker compose logs backend --tail 50"

Setup

For Claude Code (local)

  1. Copy config template:

```bash

cp config/.env.example config/.env

```

  1. Fill in config/.env with actual values

Key-based authentication:

```bash

SSH_HOST=your-server.example.com

SSH_USER=ubuntu

SSH_AUTH_METHOD=key

SSH_KEY_PATH=/absolute/path/to/private/key

SSH_KEY_PASSWORD=

SERVER_PROJECT_PATH=/path/to/project

```

Password-based authentication:

```bash

SSH_HOST=your-server.example.com

SSH_USER=ubuntu

SSH_AUTH_METHOD=password

SSH_PASSWORD='your account password'

SERVER_PROJECT_PATH=/path/to/project

```

  1. Make script executable:

```bash

chmod +x scripts/connect.sh

```

For Cloud Runtime

Set environment variables in your cloud configuration:

For password authentication, the local runtime must have either sshpass or expect.

If the host key is not trusted yet, connect once manually or add the host to known_hosts

before running non-interactive commands.

Important Notes

Example Commands

# View logs
scripts/connect.sh "docker compose logs backend --tail 100"

# Restart service
scripts/connect.sh "docker compose restart backend"

# Rebuild and restart
scripts/connect.sh "docker compose build backend && docker compose up -d backend"

# Check status
scripts/connect.sh "docker compose ps"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.