SSH Config All-In-One


Enhanced SSH Config Language Server extension for Visual Studio Code. Provides autocompletion, syntax highlighting, formatting, go to include file definitions, hover support, and quick connection actions for SSH config directives.

Features
SSH Host Explorer: A dedicated activity bar panel that lists all your SSH hosts organized by config file, with inline actions to connect, edit, search, and manage hosts.
Recent Folders: The explorer shows recently connected remote folders under each host. Folders are loaded from VS Code's connection history and persist across sessions. Right-click any folder to permanently remove it from the list.
Copy SSH Commands: Right-click any host in the explorer to copy connection info to the clipboard:
- Copy Host Alias — copies the host alias for use with
ssh <alias>
- Copy SSH Command — builds and copies the full command from the config (e.g.
ssh user@hostname -p 2222 -i ~/.ssh/key)

Quick Connect CodeLens: Provides "Connect in Current Window..." and "Connect in New Window..." inline buttons above each Host declaration. Seamlessly connects to the server using the official ms-vscode-remote.remote-ssh extension.
SSH Port Forwarding (SSH Tunnels panel): A bottom-panel view alongside the built-in Ports, styled after it. Each row is a persistent ssh -N -L/-R tunnel kept alive with automatic retries — the same effect as the forwards VS Code sets up once you SSH into a machine, but without opening a remote window:

- Right-click a host in the explorer → Forward Port... to pick the direction — Listen Local (ssh -L) to bring a remote service to this machine, or Listen Remote (ssh -R) to expose a local service on the remote machine — plus quick-fill presets for common services (MySQL, Web, PostgreSQL, Redis, SSH, RDP); the tunnel starts immediately
- Columns for direction, host, and the two sides of the tunnel — Listen (the port to listen on; ssh binds loopback) and Destination (full
host:port, resolved on the other machine) — all editable in place, and a running tunnel restarts automatically with the new arguments
- Per-row start/stop, open-in-browser, and remove; the header offers a host filter (auto-follows the window's current SSH remote), direction/status filter buttons, and a free-text search over host, address, and port
- Tunnels follow the VS Code application, not a window: they keep running across
Reload Window and window closes, all windows see and control the same set of tunnels, and they are cleaned up when VS Code quits
SSH Config Auto-Detection: Files whose name contains "config" are automatically detected as SSH Config when their content matches SSH Config patterns (e.g. Host, HostName, IdentityFile directives). Can be disabled via sshConfigAllInOne.detection.enabled.
Fuzzy Host Search: The search command supports relevance-ranked matching with extended syntax:
| Input |
Behavior |
prod |
fuzzy match — finds prod-api, production, my-prod-box |
prod jump |
AND — host must match both tokens |
"prod-api" or 'prod-api' |
exact phrase match |
^prod |
prefix — alias starts with prod |
.example.com$ |
suffix — hostname ends with .example.com |
!bastion |
exclude hosts matching bastion |
prod \| staging |
OR — matches either |
Switch back to simple substring matching via sshConfigAllInOne.search.mode: simple.
Global Search Shortcuts: Host search is available from anywhere via keybindings (identical on all platforms, including macOS):
Ctrl+Alt+F — open the fuzzy host search; the accept behavior follows sshConfigAllInOne.search.onAccept
Ctrl+Alt+S — search hosts and connect to the selected one in a new window
Universal Formatter: Formats your SSH config regardless of where it's opened (local, remote workspace, or even unsaved untitled files).
Autocompletion: Provides rich suggestions as you type in an SSH config file.
Syntax Highlighting: Enhanced and refined syntax grammar.
Hover Support: Hover over any keyword to see a brief description of its function.
Go To Definition: Supports clicking through Include statements.
Customizable Formatting: Automatically indent directives under Host and Match blocks. Controlled via the sshConfigAllInOne.format.indentSize setting.
Compatibility
Having other SSH config extensions enabled at the same time leads to duplicate completions, hovers, and highlighting:
This extension fully replaces both. Disable them in the Extensions view to avoid the conflict.
Before:
Host example
HostName ssh.example.com
User admin
Port 22
IdentityFile ~/.ssh/mykey
After (using default 2 spaces):
Host example
HostName ssh.example.com
User admin
Port 22
IdentityFile ~/.ssh/mykey
Settings
sshConfigAllInOne.format.indentSize: The number of spaces used for indentation when formatting Host and Match blocks. (Default: 2)
sshConfigAllInOne.config.additionalFiles: Additional SSH config file paths to show in the explorer. Supports ~ for home directory.
sshConfigAllInOne.config.excludeDefaultFiles: Default SSH config file paths to exclude from the explorer.
sshConfigAllInOne.detection.enabled: Automatically detect files as SSH Config when the filename contains "config" and the content matches SSH Config patterns. (Default: true)
sshConfigAllInOne.include.mode: How to handle hosts from files discovered via Include directives — merge (add to parent), separate (show as own entry), or none. (Default: separate)
sshConfigAllInOne.include.maxDepth: How many levels of Include directives to follow — 0, 1, or unlimited. (Default: unlimited)
sshConfigAllInOne.search.mode: Search mode for the host explorer — fuzzy (multi-token, quoted phrases, prefix/suffix/exclude operators, relevance ranking) or simple (original substring match). (Default: fuzzy)
sshConfigAllInOne.search.onAccept: What happens when you select a host from the search results — revealInExplorer (reveal in the panel), openConfig (open the config file at the host definition), or both. (Default: revealInExplorer)
sshConfigAllInOne.copyKey.windowsUserType: When copying a public key to a Windows host, how to treat the target account — ask (prompt each time), regular (always copy to ~/.ssh/authorized_keys), or admin (always treat as administrator and choose the destination). Administrators read keys from C:\ProgramData\ssh\administrators_authorized_keys by default, not the user home. (Default: ask)
sshConfigAllInOne.portForwards: SSH port forwarding rules shown in the SSH Tunnels panel — each entry has hostName, direction (local = ssh -L, remote = ssh -R), listenPort (the side that listens; ssh binds loopback), and destHost/destPort (full destination, resolved on the other machine). Managed by the panel and the Forward Port... context-menu action. (Default: [])
Tips
It is recommended to move the SSH Config All In One panel from the separate SSH Config All In One view into the Remote Explorer container for easier access alongside your file explorer and remote connections. To do this, click, hold and drag the SSH Config All In One icon in the activity bar and drop it into the Remote Explorer panel. This may save you a slot in the activity bar and provide a more seamless experience when managing your SSH hosts and connections.

Acknowledgements
This project is deeply based on the fantastic work by jamief on vscode-ssh-config-enhanced. Thanks for providing the original repository and all of its underlying core language features.
| |