Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | ======= |
| 2 | OpenSSH |
| 3 | ======= |
| 4 | |
| 5 | OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions. |
| 6 | |
| 7 | Sample pillar |
| 8 | ============= |
| 9 | |
| 10 | OpenSSH client |
| 11 | -------------- |
| 12 | |
| 13 | OpenSSH client with shared private key |
| 14 | |
| 15 | .. code-block:: yaml |
| 16 | |
| 17 | openssh: |
| 18 | client: |
| 19 | enabled: true |
Dmitry Stremkouski | 1c691e4 | 2017-11-17 19:10:17 +0300 | [diff] [blame] | 20 | use_dns: False |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 21 | user: |
| 22 | root: |
| 23 | enabled: true |
Jiri Broulik | d33c8dd | 2017-04-27 17:18:26 +0200 | [diff] [blame] | 24 | private_key: |
| 25 | type: rsa |
| 26 | key: ${_param:root_private_key} |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 27 | user: ${linux:system:user:root} |
| 28 | |
| 29 | OpenSSH client with individual private key and known host |
| 30 | |
| 31 | .. code-block:: yaml |
| 32 | |
| 33 | openssh: |
| 34 | client: |
| 35 | enabled: true |
| 36 | user: |
| 37 | root: |
| 38 | enabled: true |
| 39 | user: ${linux:system:user:root} |
| 40 | known_hosts: |
| 41 | - name: repo.domain.com |
| 42 | type: rsa |
| 43 | fingerprint: dd:fa:e8:68:b1:ea:ea:a0:63:f1:5a:55:48:e1:7e:37 |
Tomas Kamm | 0b2b61d | 2017-10-12 11:28:32 +0200 | [diff] [blame] | 44 | fingerprint_hash_type: sha256|md5 |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 45 | |
Petr Michalec | 244a642 | 2017-08-10 09:43:53 +0200 | [diff] [blame] | 46 | Configure keep alive settings: |
| 47 | |
| 48 | .. code-block:: yaml |
| 49 | |
| 50 | openssh: |
| 51 | client: |
| 52 | alive: |
| 53 | interval: 600 |
| 54 | count: 3 |
| 55 | |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 56 | OpenSSH server |
| 57 | -------------- |
| 58 | |
| 59 | OpenSSH server with configuration parameters |
| 60 | |
| 61 | .. code-block:: yaml |
| 62 | |
| 63 | openssh: |
| 64 | server: |
| 65 | enabled: true |
| 66 | permit_root_login: true |
| 67 | public_key_auth: true |
| 68 | password_auth: true |
| 69 | host_auth: true |
| 70 | banner: Welcome to server! |
Jiri Konecny | 2a27423 | 2016-02-16 15:49:35 +0100 | [diff] [blame] | 71 | bind: |
| 72 | address: 0.0.0.0 |
Jiri Konecny | df55053 | 2016-02-17 11:48:47 +0100 | [diff] [blame] | 73 | port: 22 |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 74 | |
Filip Pytloun | 2d3c803 | 2016-03-11 16:40:20 +0100 | [diff] [blame] | 75 | OpenSSH server with auth keys for users. |
| 76 | Parameter ``purge`` will ensure exact authorized_keys contents co undefined |
| 77 | keys will be removed. |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 78 | |
| 79 | .. code-block:: yaml |
| 80 | |
| 81 | openssh: |
| 82 | server: |
| 83 | enabled: true |
Jiri Konecny | 2a27423 | 2016-02-16 15:49:35 +0100 | [diff] [blame] | 84 | bind: |
| 85 | address: 0.0.0.0 |
Jiri Konecny | df55053 | 2016-02-17 11:48:47 +0100 | [diff] [blame] | 86 | port: 22 |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 87 | ... |
| 88 | user: |
| 89 | newt: |
| 90 | enabled: true |
| 91 | user: ${linux:system:user:newt} |
| 92 | public_keys: |
| 93 | - ${public_keys:newt} |
| 94 | root: |
| 95 | enabled: true |
Filip Pytloun | 2d3c803 | 2016-03-11 16:40:20 +0100 | [diff] [blame] | 96 | purge: true |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 97 | user: ${linux:system:user:root} |
| 98 | public_keys: |
| 99 | - ${public_keys:newt} |
| 100 | |
Filip Pytloun | a12db4a | 2016-12-02 13:21:02 +0100 | [diff] [blame] | 101 | You can also bind openssh on multiple addresses and ports: |
| 102 | |
| 103 | .. code-block:: yaml |
| 104 | |
| 105 | openssh: |
| 106 | server: |
| 107 | enabled: true |
| 108 | binds: |
| 109 | - address: 127.0.0.1 |
| 110 | port: 22 |
| 111 | - address: 192.168.1.1 |
| 112 | port: 2222 |
| 113 | |
Filip Pytloun | daf8f98 | 2015-12-16 11:55:34 +0100 | [diff] [blame] | 114 | OpenSSH server for use with FreeIPA |
| 115 | |
| 116 | .. code-block:: yaml |
| 117 | |
| 118 | openssh: |
| 119 | server: |
| 120 | enabled: true |
Jiri Konecny | 2a27423 | 2016-02-16 15:49:35 +0100 | [diff] [blame] | 121 | bind: |
| 122 | address: 0.0.0.0 |
Jiri Konecny | df55053 | 2016-02-17 11:48:47 +0100 | [diff] [blame] | 123 | port: 22 |
Filip Pytloun | daf8f98 | 2015-12-16 11:55:34 +0100 | [diff] [blame] | 124 | public_key_auth: true |
| 125 | authorized_keys_command: |
| 126 | command: /usr/bin/sss_ssh_authorizedkeys |
| 127 | user: nobody |
| 128 | |
Petr Michalec | 244a642 | 2017-08-10 09:43:53 +0200 | [diff] [blame] | 129 | Configure keep alive settings: |
| 130 | |
| 131 | .. code-block:: yaml |
| 132 | |
| 133 | openssh: |
| 134 | server: |
| 135 | alive: |
| 136 | keep: yes |
| 137 | interval: 600 |
| 138 | count: 3 |
| 139 | # |
| 140 | # will give you an timeout of 30 minutes (600 sec x 3) |
| 141 | |
Marek Celoud | 7f50705 | 2017-11-06 15:50:23 +0100 | [diff] [blame] | 142 | Enable DSA legacy keys: |
| 143 | |
| 144 | .. code-block:: yaml |
| 145 | |
| 146 | openssh: |
| 147 | server: |
| 148 | dss_enabled: true |
| 149 | |
Filip Pytloun | a6d4a78 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 150 | Read more |
| 151 | ========= |
| 152 | |
| 153 | * http://www.openssh.org/manual.html |
| 154 | * https://help.ubuntu.com/community/SSH/OpenSSH/Configuring |
| 155 | * http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html |
| 156 | * http://www.zeitoun.net/articles/ssh-through-http-proxy/start |
Filip Pytloun | 0e13906 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 157 | |
| 158 | Documentation and Bugs |
| 159 | ====================== |
| 160 | |
| 161 | To learn how to install and update salt-formulas, consult the documentation |
| 162 | available online at: |
| 163 | |
| 164 | http://salt-formulas.readthedocs.io/ |
| 165 | |
| 166 | In the unfortunate event that bugs are discovered, they should be reported to |
| 167 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 168 | formula: |
| 169 | |
| 170 | https://github.com/salt-formulas/salt-formula-openssh/issues |
| 171 | |
| 172 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 173 | use Launchpad salt-formulas project: |
| 174 | |
| 175 | https://launchpad.net/salt-formulas |
| 176 | |
| 177 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 178 | |
| 179 | https://launchpad.net/~salt-formulas-users |
| 180 | |
| 181 | Developers wishing to work on the salt-formulas projects should always base |
| 182 | their work on master branch and submit pull request against specific formula. |
| 183 | |
| 184 | https://github.com/salt-formulas/salt-formula-openssh |
| 185 | |
| 186 | Any questions or feedback is always welcome so feel free to join our IRC |
| 187 | channel: |
| 188 | |
| 189 | #salt-formulas @ irc.freenode.net |