Automated summary
This skill covers secure server access and tunneling with SSH, from key generation to host configuration and server hardening.
Strengths
- Provides concrete commands for generating and deploying ED25519 keys.
- Shows how to simplify connections with ~/.ssh/config, including jump hosts via ProxyJump.
- Covers all three port-forwarding modes (local, remote, SOCKS) with directly reusable examples.
- Includes a baseline sshd_config hardening section for production.
Limitations
- Does not detail agent forwarding despite mentioning it in the overview.
- Does not cover SSH certificates, roles, or a certificate authority.
- Assumes a Linux server with access to sshd_config and gives no Windows-specific procedure.
Use when connecting to remote servers, setting up SSH keys or config, creating tunnels or jump hosts, or hardening an SSH service.
Avoid when the task involves non-SSH remote access, cloud identity management, or advanced SSH PKI/certificate infrastructure beyond this guide.
Security analysis
CautionThe skill provides legitimate SSH usage: key generation, config, tunneling, jump hosts, and server hardening. It uses powerful shell and remote-access commands, but there is no destructive action, credential exfiltration, obfuscated payload, or instruction to disable safety controls.
No concerns found
How this analysis is madeExamples
Add a `prod` host to my ~/.ssh/config for deploy@203.0.113.10 on port 2222 using ~/.ssh/deploy_key, so I can connect with just `ssh prod`.Create an SSH local tunnel through my bastion host so I can reach the internal PostgreSQL database at db.internal:5432 on localhost:5432.Write a hardened /etc/ssh/sshd_config section that disables root login and password auth, allows only deploy and admin, and moves SSH to port 2222.name: ssh description: >- Secure server access and tunneling with SSH. Use when a user asks to connect to remote servers, set up SSH keys, create tunnels, configure jump hosts, manage SSH config, or automate remote commands. license: Apache-2.0 compatibility: 'Linux, macOS, Windows (OpenSSH)' metadata: author: terminal-skills version: 1.0.0 category: devops tags: - ssh - remote - tunneling - security - servers
SSH
Overview
SSH (Secure Shell) provides encrypted remote access to servers. Beyond basic login, it handles key-based auth, port forwarding (tunnels), jump hosts (bastion), file transfer (SCP/SFTP), and agent forwarding.
Instructions
Step 1: Key Setup
# Generate ED25519 key (recommended over RSA)
ssh-keygen -t ed25519 -C "your@email.com"
# Copy public key to server
ssh-copy-id user@server.example.com
# Or manually:
cat ~/.ssh/id_ed25519.pub | ssh user@server "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Step 2: SSH Config
# ~/.ssh/config — Named host configurations
Host prod
HostName 203.0.113.10
User deploy
Port 2222
IdentityFile ~/.ssh/deploy_key
Host staging
HostName staging.example.com
User deploy
ProxyJump bastion
Host bastion
HostName bastion.example.com
User admin
IdentityFile ~/.ssh/bastion_key
Host dev-*
HostName %h.internal.example.com
User developer
ProxyJump bastion
# Now just:
ssh prod # connects to 203.0.113.10:2222 as deploy
ssh staging # connects through bastion
ssh dev-api # connects to dev-api.internal.example.com via bastion
Step 3: Tunneling
# Local forward: access remote service locally
ssh -L 5432:db.internal:5432 bastion
# Now connect to localhost:5432 to reach the internal database
# Remote forward: expose local service to remote
ssh -R 8080:localhost:3000 prod
# Remote server can now reach your local app at localhost:8080
# Dynamic SOCKS proxy
ssh -D 1080 prod
# Use as SOCKS proxy for all traffic
Step 4: Server Hardening
# /etc/ssh/sshd_config — Production SSH hardening
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
AllowUsers deploy admin
Port 2222
Guidelines
- Always use key-based auth in production — disable password auth.
- ED25519 keys are shorter and more secure than RSA.
- Use ProxyJump (bastion/jump host) instead of exposing internal servers to the internet.
ssh-agentcaches keys in memory — no need to enter passphrase repeatedly.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/secure-ssh-access-and-tunneling-ms47vp93/download' --output '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md.part' && mv '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md.part' '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Environment declared by the author: Linux, macOS, Windows (OpenSSH)
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && test -s '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ssh' && cp -R '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93' '.claude/skills/ssh'Cursor
test -f '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && test -s '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/ssh' && cp -R '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93' '.cursor/skills/ssh'Codex
test -f '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && test -s '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/ssh' && cp -R '.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93' '.agents/skills/ssh'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/secure-ssh-access-and-tunneling-ms47vp93'openskills read 'secure-ssh-access-and-tunneling-ms47vp93'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/secure-ssh-access-and-tunneling-ms47vp93/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.