Loading...
Loading...
SSH remote access patterns and secure shell utilities. Covers connections, config management, key generation (Ed25519, FIDO2), tunneling, port forwarding, file transfers, and multiplexing. Use when connecting to servers, managing SSH keys, setting up tunnels, transferring files over SSH, configuring jump hosts, or hardening SSH access.
npx skill4agent add oakoss/agent-skills ssh-remote~/.ssh/config| Pattern | Command / Directive | Key Points |
|---|---|---|
| Basic connect | | Add |
| Identity file | | Specify private key explicitly |
| Remote command | | Add |
| SSH config alias | | Simplifies repeated connections |
| File copy (rsync) | | Preferred over scp for all transfers |
| File copy (scp) | | Legacy protocol; uses SFTP internally |
| Local tunnel | | Access remote services locally |
| Remote tunnel | | Expose local services to remote |
| SOCKS proxy | | Dynamic port forwarding |
| Jump host | | ProxyJump, available since OpenSSH 7.3 |
| Key generation | | Ed25519 recommended for all new keys |
| FIDO2 key | | Hardware-backed, requires OpenSSH 8.2+ |
| Agent | | Cache key passphrase for session |
| Multiplexing | | Reuse TCP connections across sessions |
| Debug | | Up to |
| Algorithm | Recommendation | Notes |
|---|---|---|
| Ed25519 | Default for all new keys | 256-bit, fast, secure, supported on OpenSSH 6.5+ |
| Ed25519-SK (FIDO2) | Strongest option with hardware key | Requires physical security key, OpenSSH 8.2+ |
| RSA 4096 | Legacy compatibility only | Use only when Ed25519 is unsupported by the remote system |
| ECDSA | Avoid | Implementation concerns; prefer Ed25519 |
| Scenario | Tool | Why |
|---|---|---|
| Recurring syncs or large directories | | Delta sync, compression, resume, progress |
| Quick one-off file copy | | scp is simpler; rsync is more capable |
| Interactive file browsing | | Tab completion, directory navigation |
| High-bandwidth WAN transfers | Specialized tools (Globus) | SSH buffer limits reduce WAN throughput |
| Mistake | Correct Pattern |
|---|---|
| Using RSA keys for new setups | Generate Ed25519 keys -- faster, smaller, and equally secure |
Using | Use |
| Typing passphrase repeatedly during sessions | Use |
| Connecting through multiple hops with nested SSH | Use |
Running interactive commands without | Use |
Using | Use ProxyJump instead -- agent forwarding exposes keys to compromised hosts |
Setting | Include all three tokens to ensure unique sockets per connection |
| Disabling host key checking globally | Only use |
Not using | Prevents offering every loaded key to every server |
PasswordAuthentication noPermitRootLogin prohibit-passwordnoIdentitiesOnly yescommand=from=authorized_keysed25519-skfail2banExploreTaskPlan