MCPInstall

ssh

Establish and manage SSH connections to remote machines, including key generation, configuration, and file transfers. Use when connecting to remote servers, executing remote commands, or transferring files via SCP.

Installs
1.2K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/openhands/extensions --skill ssh
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads ssh automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

SSH Skill

This skill provides capabilities for establishing and managing SSH connections to remote machines. Windows PowerShell equivalents for SSH config creation, key paths, ssh-agent, and permissions are in references/windows.md.

Capabilities

  • Establish SSH connections using password or key-based authentication
  • Generate and manage SSH key pairs
  • Configure SSH for easier connections
  • Execute commands on remote machines
  • Transfer files between local and remote machines
  • Manage SSH configurations and known hosts

Authentication Methods

Password Authentication

ssh username@hostname

When prompted, you should ask the user for their password or a private key.

Key-Based Authentication

Generate a new SSH key pair:

ssh-keygen -t ed25519 -f ~/.ssh/key_name -C "comment" -N ""

Copy the public key to the remote server:

ssh-copy-id -i ~/.ssh/key_name.pub username@hostname

Connect using the private key:

ssh -i ~/.ssh/key_name username@hostname

SSH Configuration

Create or edit the SSH config file for easier connections:

mkdir -p ~/.ssh
cat > ~/.ssh/config << 'EOF'
Host alias
    HostName hostname_or_ip
    User username
    IdentityFile ~/.ssh/key_name
    Port 22
    ServerAliveInterval 60
EOF
chmod 600 ~/.ssh/config

Then connect using the alias:

ssh alias

Common SSH Options

  • -p PORT: Connect to a specific port
  • -X: Enable X11 forwarding
  • -L local_port:remote_host:remote_port: Set up local port forwarding
  • -R remote_port:local_host:local_port: Set up remote port forwarding
  • -N: Do not execute a remote command (useful for port forwarding)
  • -f: Run in background
  • -v: Verbose mode (add more v's for increased verbosity)

File Transfer with SCP

Copy a file to the remote server:

scp /path/to/local/file username@hostname:/path/to/remote/directory/

Copy a file from the remote server:

scp username@hostname:/path/to/remote/file /path/to/local/directory/

Copy a directory recursively:

scp -r /path/to/local/directory username@hostname:/path/to/remote/directory/

SSH Agent

Start the SSH agent:

eval "$(ssh-agent -s)"

Add a key to the agent:

ssh-add ~/.ssh/key_name

Troubleshooting

  • Check SSH service status on remote: systemctl status sshd
  • Verify SSH port is open: nc -zv hostname 22
  • Debug connection issues: ssh -vvv username@hostname
  • Check permissions: SSH private keys should have 600 permissions (chmod 600 ~/.ssh/key_name)
  • Verify known_hosts: If host key changed, remove the old entry with ssh-keygen -R hostname

Secure SSH Key Management

Local Storage with Proper Permissions

The most basic approach is to ensure proper file permissions:

# Set correct permissions for private keys
chmod 600 ~/.ssh/id_ed25519
# Set correct permissions for public keys
chmod 644 ~/.ssh/id_ed25519.pub
# Set correct permissions for SSH directory
chmod 700 ~/.ssh

FAQ

What does the ssh skill do?

Establish and manage SSH connections to remote machines, including key generation, configuration, and file transfers. Use when connecting to remote servers, executing remote commands, or transferring files via SCP.

How do I install ssh?

Run npx skills add https://github.com/openhands/extensions --skill ssh in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ssh/ (personal) or .claude/skills/ssh/ (project).

Which AI agents can use ssh?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is ssh safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains ssh?

It is published by openhands in openhands/extensions. It has 1,196 recorded installs.

More from openhands/extensions

View all →

code-review

openhands/extensions

Open the skill to read its SKILL.md instructions.

docker

openhands/extensions

Open the skill to read its SKILL.md instructions.

DevOps & Cloud121 installs

codereview-roasted

openhands/extensions

Open the skill to read its SKILL.md instructions.

119 installs

jupyter

openhands/extensions

Open the skill to read its SKILL.md instructions.

108 installs

security

openhands/extensions

Open the skill to read its SKILL.md instructions.

Security98 installs

uv

openhands/extensions

Open the skill to read its SKILL.md instructions.

94 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs