blob: 2cf834b6499f36885671d8752bdadd9d493e4bea [file] [log] [blame]
Filip Pytlouna6d4a782015-10-06 16:28:32 +02001=======
2OpenSSH
3=======
4
5OpenSSH 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
7Sample pillar
8=============
9
10OpenSSH client
11--------------
12
13OpenSSH client with shared private key
14
15.. code-block:: yaml
16
17 openssh:
18 client:
19 enabled: true
20 user:
21 root:
22 enabled: true
Jiri Broulikd33c8dd2017-04-27 17:18:26 +020023 private_key:
24 type: rsa
25 key: ${_param:root_private_key}
Filip Pytlouna6d4a782015-10-06 16:28:32 +020026 user: ${linux:system:user:root}
27
28OpenSSH client with individual private key and known host
29
30.. code-block:: yaml
31
32 openssh:
33 client:
34 enabled: true
35 user:
36 root:
37 enabled: true
38 user: ${linux:system:user:root}
39 known_hosts:
40 - name: repo.domain.com
41 type: rsa
42 fingerprint: dd:fa:e8:68:b1:ea:ea:a0:63:f1:5a:55:48:e1:7e:37
Tomas Kamm0b2b61d2017-10-12 11:28:32 +020043 fingerprint_hash_type: sha256|md5
Filip Pytlouna6d4a782015-10-06 16:28:32 +020044
Petr Michalec244a6422017-08-10 09:43:53 +020045Configure keep alive settings:
46
47.. code-block:: yaml
48
49 openssh:
50 client:
51 alive:
52 interval: 600
53 count: 3
54
Filip Pytlouna6d4a782015-10-06 16:28:32 +020055OpenSSH server
56--------------
57
58OpenSSH server with configuration parameters
59
60.. code-block:: yaml
61
62 openssh:
63 server:
64 enabled: true
65 permit_root_login: true
66 public_key_auth: true
67 password_auth: true
68 host_auth: true
69 banner: Welcome to server!
Jiri Konecny2a274232016-02-16 15:49:35 +010070 bind:
71 address: 0.0.0.0
Jiri Konecnydf550532016-02-17 11:48:47 +010072 port: 22
Filip Pytlouna6d4a782015-10-06 16:28:32 +020073
Filip Pytloun2d3c8032016-03-11 16:40:20 +010074OpenSSH server with auth keys for users.
75Parameter ``purge`` will ensure exact authorized_keys contents co undefined
76keys will be removed.
Filip Pytlouna6d4a782015-10-06 16:28:32 +020077
78.. code-block:: yaml
79
80 openssh:
81 server:
82 enabled: true
Jiri Konecny2a274232016-02-16 15:49:35 +010083 bind:
84 address: 0.0.0.0
Jiri Konecnydf550532016-02-17 11:48:47 +010085 port: 22
Filip Pytlouna6d4a782015-10-06 16:28:32 +020086 ...
87 user:
88 newt:
89 enabled: true
90 user: ${linux:system:user:newt}
91 public_keys:
92 - ${public_keys:newt}
93 root:
94 enabled: true
Filip Pytloun2d3c8032016-03-11 16:40:20 +010095 purge: true
Filip Pytlouna6d4a782015-10-06 16:28:32 +020096 user: ${linux:system:user:root}
97 public_keys:
98 - ${public_keys:newt}
99
Filip Pytlouna12db4a2016-12-02 13:21:02 +0100100You can also bind openssh on multiple addresses and ports:
101
102.. code-block:: yaml
103
104 openssh:
105 server:
106 enabled: true
107 binds:
108 - address: 127.0.0.1
109 port: 22
110 - address: 192.168.1.1
111 port: 2222
112
Filip Pytloundaf8f982015-12-16 11:55:34 +0100113OpenSSH server for use with FreeIPA
114
115.. code-block:: yaml
116
117 openssh:
118 server:
119 enabled: true
Jiri Konecny2a274232016-02-16 15:49:35 +0100120 bind:
121 address: 0.0.0.0
Jiri Konecnydf550532016-02-17 11:48:47 +0100122 port: 22
Filip Pytloundaf8f982015-12-16 11:55:34 +0100123 public_key_auth: true
124 authorized_keys_command:
125 command: /usr/bin/sss_ssh_authorizedkeys
126 user: nobody
127
Petr Michalec244a6422017-08-10 09:43:53 +0200128Configure keep alive settings:
129
130.. code-block:: yaml
131
132 openssh:
133 server:
134 alive:
135 keep: yes
136 interval: 600
137 count: 3
138 #
139 # will give you an timeout of 30 minutes (600 sec x 3)
140
Filip Pytlouna6d4a782015-10-06 16:28:32 +0200141Read more
142=========
143
144* http://www.openssh.org/manual.html
145* https://help.ubuntu.com/community/SSH/OpenSSH/Configuring
146* http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html
147* http://www.zeitoun.net/articles/ssh-through-http-proxy/start
Filip Pytloun0e139062017-02-02 13:02:03 +0100148
149Documentation and Bugs
150======================
151
152To learn how to install and update salt-formulas, consult the documentation
153available online at:
154
155 http://salt-formulas.readthedocs.io/
156
157In the unfortunate event that bugs are discovered, they should be reported to
158the appropriate issue tracker. Use Github issue tracker for specific salt
159formula:
160
161 https://github.com/salt-formulas/salt-formula-openssh/issues
162
163For feature requests, bug reports or blueprints affecting entire ecosystem,
164use Launchpad salt-formulas project:
165
166 https://launchpad.net/salt-formulas
167
168You can also join salt-formulas-users team and subscribe to mailing list:
169
170 https://launchpad.net/~salt-formulas-users
171
172Developers wishing to work on the salt-formulas projects should always base
173their work on master branch and submit pull request against specific formula.
174
175 https://github.com/salt-formulas/salt-formula-openssh
176
177Any questions or feedback is always welcome so feel free to join our IRC
178channel:
179
180 #salt-formulas @ irc.freenode.net