Skip to content

SSH connection manager skill for Claude Code - save and use SSH connections with encrypted credential storage

Notifications You must be signed in to change notification settings

bigph00t/SSH-Skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Skill for Claude Code

A Claude Code skill for managing SSH connections with encrypted credential storage.

Features

  • Encrypted password storage - Passwords encrypted with Fernet symmetric encryption
  • Key-based authentication - Support for SSH key files
  • Connection testing - Tests connection before saving
  • Interactive setup - /ssh-add walks you through connection setup
  • Quick execution - /ssh myserver hostname runs commands instantly

Commands

Command Description
/ssh-add Add a new SSH connection (interactive)
/ssh-list List all saved connections
/ssh <name> [command] Run a command on a saved connection
/ssh-remove <name> Remove a saved connection

Installation

Quick Install

# Clone the repo
git clone https://github.com/bigph00t/SSH-Skill.git
cd SSH-Skill

# Copy commands to Claude Code
cp commands/*.md ~/.claude/commands/

# Install the SSH manager script
mkdir -p ~/.local/bin
cp scripts/ssh ~/.local/bin/claude-ssh
cp scripts/ssh_manager.py ~/.local/bin/
chmod +x ~/.local/bin/claude-ssh ~/.local/bin/ssh_manager.py

# Make sure ~/.local/bin is in your PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Dependencies

System packages:

# Debian/Ubuntu
sudo apt install sshpass

# macOS
brew install hudochenkov/sshpass/sshpass

Python packages:

pip install cryptography

Usage

Add a Connection

/ssh-add

Claude will ask for:

  • Connection name (e.g., myserver)
  • Host (IP or hostname)
  • Username
  • Port (default: 22)
  • Auth type (key or password)
  • Key path or password

The connection is tested before saving.

List Connections

/ssh-list

Shows all saved connections with masked passwords.

Run Remote Commands

/ssh myserver hostname
/ssh myserver ls -la /var/log
/ssh myserver "cat /etc/os-release"

Remove a Connection

/ssh-remove myserver

Storage

Credentials are stored in:

  • ~/.claude/ssh-connections.json - Connection metadata (passwords encrypted)
  • ~/.claude/ssh-key.key - Fernet encryption key

Both files are created with 0600 permissions (owner read/write only).

Security Notes

  • Passwords are encrypted at rest using Fernet (AES-128-CBC)
  • Encryption key is auto-generated on first use
  • SSH key-based auth is recommended over passwords
  • Host key checking is disabled for convenience (use with trusted hosts only)
  • Never commit ~/.claude/ssh-connections.json or ~/.claude/ssh-key.key

License

MIT

About

SSH connection manager skill for Claude Code - save and use SSH connections with encrypted credential storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published