|
1 |
| -# SSH Config Language |
2 |
| - |
3 |
| -Provides highlighting and snippets for [`~/.ssh/config`][man-ssh-config] and [`/etc/ssh/sshd_config`][man-sshd-config] files. |
4 |
| - |
5 |
| -## Installation |
6 |
| - |
7 |
| -This package [is available][pkg] via [Package Control][pkg-ctrl]. You can install it by searching for SSH in the "Install Package" interface or by cloning this repository in your Sublime Text "Packages" directory. |
8 |
| - |
9 |
| -### SSH Config |
10 |
| - |
11 |
| -- `host`: create a new Host entry |
12 |
| -- `match`: create a new Match entry |
13 |
| -- Keyword completion for many \*Nix and \*BSD options |
14 |
| -- Symbol Index for hosts and aliases |
15 |
| - (<kbd>Ctrl</kbd>+<kbd>R</kbd> or |
16 |
| - <kbd>Cmd</kbd>+<kbd>R</kbd>) |
17 |
| - |
18 |
| -Note that `~/.ssh/config` is not linked to the SSH Config syntax highlighting |
19 |
| -out of the box. This is because the filename is shared by other formats (e.g. |
20 |
| -`.git/config`) and we don't want to set the wrong highlighting for those. |
21 |
| - |
22 |
| -Here are three ways to change that: |
23 |
| - |
24 |
| -1. Use the "Open SSH Config" command to open your config, which proactively |
25 |
| - sets the right highlighting unless you disable it. |
26 |
| -2. Choose "Open all with current extension as..." from the syntax highlighting |
27 |
| - selection menu. |
28 |
| -3. Install and configure [ApplySyntax][] to examine the whole path of the file |
29 |
| - and set the syntax highlighting after load. Sample configuration |
30 |
| - [shown here][applysyntax-config] |
31 |
| - |
32 |
| -### SSHD Config |
33 |
| - |
34 |
| -- Keyword completion for many \*Nix and \*BSD options |
35 |
| -- Symbol Index for active and commented-out config options |
36 |
| - (<kbd>Ctrl</kbd>+<kbd>R</kbd> or |
37 |
| - <kbd>Cmd</kbd>+<kbd>R</kbd>) |
38 |
| - |
39 |
| -## Commands |
40 |
| - |
41 |
| -- Open SSH Config File |
42 |
| -- Open SSHD Config File |
43 |
| - |
44 |
| -If these commands open the wrong file for you, open the Command Palette |
45 |
| -(<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> or |
46 |
| - <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>), search for |
47 |
| - "SSH Config: Settings", and put in content like this: |
48 |
| - |
49 |
| -``` jsonc |
50 |
| -{ |
51 |
| - "file_locations": { |
52 |
| - "ssh_config": "~/.ssh/config", |
53 |
| - "sshd_config": "/etc/ssh/sshd_config", |
54 |
| - "known_hosts": "~/.ssh/known_hosts", |
55 |
| - "authorized_keys": "~/.ssh/authorized_keys", |
56 |
| - }, |
57 |
| -} |
58 |
| -``` |
59 |
| - |
60 |
| -## Extras |
61 |
| - |
62 |
| -- `authorized_keys` and `known_hosts` also have |
63 |
| - + Syntax highlighting |
64 |
| - + Symbol index |
65 |
| - + (unmapped) "Open file" commands |
66 |
| -- Completion and highlighting for crypto stuff |
67 |
| - + Key types |
68 |
| - + KEX algorithms |
69 |
| - + Encryption ciphers |
70 |
| - + MACs |
71 |
| - |
72 |
| -## To-Do |
73 |
| - |
74 |
| -- Better highlighting for paths |
75 |
| - |
76 |
| -[man-ssh-config]: https://man7.org/linux/man-pages/man5/ssh_config.5.html |
77 |
| -[man-sshd-config]: https://man7.org/linux/man-pages/man5/sshd_config.5.html |
78 |
| -[pkg]: https://packagecontrol.io/packages/SSH%20Config |
79 |
| -[pkg-ctrl]: https://packagecontrol.io |
80 |
| -[applysyntax]: https://packagecontrol.io/packages/ApplySyntax |
81 |
| -[applysyntax-config]: https://github.com/robballou/sublimetext-sshconfig/issues/8#issuecomment-686492850 |
| 1 | +# SSH Config Language |
| 2 | + |
| 3 | +Provides highlighting and snippets for [`~/.ssh/config`][man-ssh-config] and [`/etc/ssh/sshd_config`][man-sshd-config] files. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +This package [is available][pkg] via [Package Control][pkg-ctrl]. You can install it by searching for SSH in the "Install Package" interface or by cloning this repository in your Sublime Text "Packages" directory. |
| 8 | + |
| 9 | +### SSH Config |
| 10 | + |
| 11 | +- `host`: create a new Host entry |
| 12 | +- `match`: create a new Match entry |
| 13 | +- Keyword completion for many \*Nix and \*BSD options |
| 14 | +- Symbol Index for hosts and aliases |
| 15 | + (<kbd>Ctrl</kbd>+<kbd>R</kbd> or |
| 16 | + <kbd>Cmd</kbd>+<kbd>R</kbd>) |
| 17 | + |
| 18 | +Note that `~/.ssh/config` is not linked to the SSH Config syntax highlighting |
| 19 | +out of the box. This is because the filename is shared by other formats (e.g. |
| 20 | +`.git/config`) and we don't want to set the wrong highlighting for those. |
| 21 | + |
| 22 | +Here are three ways to change that: |
| 23 | + |
| 24 | +1. Use the "Open SSH Config" command to open your config, which proactively |
| 25 | + sets the right highlighting unless you disable it. |
| 26 | +2. Choose "Open all with current extension as..." from the syntax highlighting |
| 27 | + selection menu. |
| 28 | +3. Install and configure [ApplySyntax][] to examine the whole path of the file |
| 29 | + and set the syntax highlighting after load. Sample configuration |
| 30 | + [shown here][applysyntax-config] |
| 31 | + |
| 32 | +### SSHD Config |
| 33 | + |
| 34 | +- Keyword completion for many \*Nix and \*BSD options |
| 35 | +- Symbol Index for active and commented-out config options |
| 36 | + (<kbd>Ctrl</kbd>+<kbd>R</kbd> or |
| 37 | + <kbd>Cmd</kbd>+<kbd>R</kbd>) |
| 38 | + |
| 39 | +## Commands |
| 40 | + |
| 41 | +- Open SSH Config File |
| 42 | +- Open SSHD Config File |
| 43 | + |
| 44 | +If these commands open the wrong file for you, open the Command Palette |
| 45 | +(<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> or |
| 46 | + <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>), search for |
| 47 | + "SSH Config: Settings", and put in content like this: |
| 48 | + |
| 49 | +``` jsonc |
| 50 | +{ |
| 51 | + "file_locations": { |
| 52 | + "ssh_config": "~/.ssh/config", |
| 53 | + "sshd_config": "/etc/ssh/sshd_config", |
| 54 | + "known_hosts": "~/.ssh/known_hosts", |
| 55 | + "authorized_keys": "~/.ssh/authorized_keys", |
| 56 | + }, |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +## Extras |
| 61 | + |
| 62 | +- `authorized_keys` and `known_hosts` also have |
| 63 | + + Syntax highlighting |
| 64 | + + Symbol index |
| 65 | + + (unmapped) "Open file" commands |
| 66 | +- Completion and highlighting for crypto stuff |
| 67 | + + Key types |
| 68 | + + KEX algorithms |
| 69 | + + Encryption ciphers |
| 70 | + + MACs |
| 71 | + |
| 72 | +## To-Do |
| 73 | + |
| 74 | +- Better highlighting for paths |
| 75 | + |
| 76 | +[man-ssh-config]: https://man7.org/linux/man-pages/man5/ssh_config.5.html |
| 77 | +[man-sshd-config]: https://man7.org/linux/man-pages/man5/sshd_config.5.html |
| 78 | +[pkg]: https://packagecontrol.io/packages/SSH%20Config |
| 79 | +[pkg-ctrl]: https://packagecontrol.io |
| 80 | +[applysyntax]: https://packagecontrol.io/packages/ApplySyntax |
| 81 | +[applysyntax-config]: https://github.com/robballou/sublimetext-sshconfig/issues/8#issuecomment-686492850 |
0 commit comments