Provides highlighting and snippets for ~/.ssh/config
and /etc/ssh/sshd_config
files.
This package is available via Package Control. You can install it by searching for SSH in the "Install Package" interface or by cloning this repository in your Sublime Text "Packages" directory.
host
: create a new Host entrymatch
: create a new Match entry- Keyword completion for many *Nix and *BSD options
- Symbol Index for hosts and aliases (Ctrl+R or Cmd+R)
Note that ~/.ssh/config
is not linked to the SSH Config syntax highlighting
out of the box. This is because the filename is shared by other formats (e.g.
.git/config
) and we don't want to set the wrong highlighting for those.
Here are three ways to change that:
- Use the "Open SSH Config" command to open your config, which proactively sets the right highlighting unless you disable it.
- Choose "Open all with current extension as..." from the syntax highlighting selection menu.
- Install and configure ApplySyntax to examine the whole path of the file and set the syntax highlighting after load. Sample configuration shown here
- Keyword completion for many *Nix and *BSD options
- Symbol Index for active and commented-out config options (Ctrl+R or Cmd+R)
- Open SSH Config File
- Open SSHD Config File
If these commands open the wrong file for you, open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P), search for "SSH Config: Settings", and put in content like this:
{
"file_locations": {
"ssh_config": "~/.ssh/config",
"sshd_config": "/etc/ssh/sshd_config",
"known_hosts": "~/.ssh/known_hosts",
"authorized_keys": "~/.ssh/authorized_keys",
},
}
authorized_keys
andknown_hosts
also have- Syntax highlighting
- Symbol index
- (unmapped) "Open file" commands
- Completion and highlighting for crypto stuff
- Key types
- KEX algorithms
- Encryption ciphers
- MACs
- Install this repository under Sublime Text
Packages
and name itSSH Config
- by cloning the repo or moving it or symlinking it
- Open the project from under
Packages/SSH Config
- Open a syntax test file located in the Tests directory
- Run
Build With: Syntax Tests
command- supplied by the
PackageDev
Sublime Package - available on the command palette when a test file is open
- supplied by the
- Better highlighting for paths