SSH Server
by @xingfalin
SSH remote connection and operation for servers (Linux/Unix cloud servers, etc.)
clawhub install ssh-serverπ About This Skill
name: ssh-server description: SSH remote connection and operation for servers (Linux/Unix cloud servers, etc.) read_when: - User needs SSH connection to remote server - Need to view/operate remote server - Need to query server status, logs - Need to execute commands on server metadata: {"emoji":"π₯οΈ","requires":{"bins":["ssh"]}} allowed-tools: Bash(ssh:*)
SSH Server - Remote Server Management
Overview
Connect to and operate remote Linux/Unix servers via SSH.
Security Notes
β οΈ Important: Protect Sensitive Info
Initial Setup
1. Install Dependencies
SSH client is usually pre-installed:
2. Add Server Config
Method A: Interactive Add (Recommended)
Run this in your local terminal:
python D:\openClaw\openclaw\config\ssh_config.py add
Then enter:
Method B: SSH Key Login (More Secure)
# 1. Generate local SSH key (if not exists)
ssh-keygen -t ed255192. Copy public key to server
ssh-copy-id user@your-server-ip
Connect to Server
Interactive Connect (Password)
Run in your terminal:
ssh -o StrictHostKeyChecking=no user@your-server-ip
Then enter password manually.
Connect Using Config Alias
Run in your terminal:
python D:\openClaw\openclaw\config\ssh_config.py connect
System will prompt for password, then connect.
Server Operations
After connecting, you can execute:
System Status
# System overview
uptimeMemory usage
free -hDisk usage
df -hCPU info
lscpuFull system info
uname -a && uptime && free -h && df -h
Users and Processes
# Online users
whoProcess list
ps auxProcesses sorted by memory
ps aux --sort=-%memFind specific process
ps aux | grep nginx
Network Status
# Network connections
ss -tulnPort usage
netstat -tuln
Service Management
# Check service status
systemctl status nginxStart service
sudo systemctl start nginxStop service
sudo systemctl stop nginxRestart service
sudo systemctl restart nginx
Log Viewing
# System logs
sudo journalctl -xeLast 100 lines
sudo journalctl -n 100Specific service logs
sudo journalctl -u nginxReal-time log
tail -f /var/log/syslog
Docker Operations
# Running containers
docker psAll containers
docker ps -aContainer logs
docker logs container_nameEnter container
docker exec -it container_name bash
Config File
Server configs saved to D:\openClaw\openclaw\config\servers.json (passwords encrypted).
{
"vps": {
"host": "xxx.xxx.xxx.xxx",
"port": 22,
"username": "root",
"key_file": null,
"password_encrypted": "gAAAAAB..."
}
}
Management Commands
# Add server
python config/ssh_config.py addList servers
python config/ssh_config.py listConnect to server
python config/ssh_config.py connect Delete server
python config/ssh_config.py delete
Usage Flow
1. User tells AI: Want to connect to my VPS
2. AI prompts user: Run python config/ssh_config.py add in terminal
3. After user adds: AI can connect to server via config
4. Connection methods:
- Password: User runs ssh user@IP and enters password
- Key: Direct connect after config