SSH
Connect to remote servers via SSH protocol to execute commands and retrieve results.
Key Features
- Remote server command execution
- Real-time command output retrieval
- Secure SSH connections
- Support for various authentication methods
Basic Information
Authentication Method
Authenticate using SSH keys or passwords.
Input Parameters
- Host (required): SSH server host address
- Port (required): SSH server port (default: 22)
- Username (required): SSH username
- Password (optional): SSH password
- Private Key (optional): SSH private key
- Passphrase (optional): Passphrase for decrypting encrypted SSH private key
Supported MCP Tools
Command Execution Tools
execute_command
Execute shell commands on remote SSH server and return output.
Input Parameters:
command
(required): Shell command to execute
Supported Command Examples:
- System information:
uname -a
,whoami
,pwd
- File system operations:
ls -la
,cat filename
,find /path -name "*.txt"
- Process management:
ps aux
,top
,htop
- Network diagnostics:
ping hostname
,netstat -an
,ss -tuln
- System monitoring:
df -h
,free -m
,uptime
- Log viewing:
tail -f /var/log/syslog
,journalctl -f
Usage Example
For example,
- When you input the prompt “Check the disk usage of the remote server”,
- The LLM will call the
execute_command
tool through MCP to execute thedf -h
command. - Then, it responds in the chat based on the tool call results.
Precautions
- Keep SSH authentication information secure.
- Use read-only commands on production servers.
- Carefully review system-changing commands before execution.
- Check network connection status.
- Appropriately limit command execution permissions.
Last updated on