upstream: enable PerSourcePenalties by default.

ok markus

NB. if you run a sshd that accepts connections from behind large NAT
blocks, proxies or anything else that aggregates many possible users
behind few IP addresses, then this change may cause legitimate traffic
to be denied.

Please read the PerSourcePenalties, PerSourcePenaltyExemptList and
PerSourceNetBlockSize options in sshd_config(5) for how to tune your
sshd(8) for your specific circumstances.

OpenBSD-Commit-ID: 24a0e5c23d37e5a63e16d2c6da3920a51078f6ce
1 file changed
tree: 304822d6ae27887d3bd6ac43fc807e00e4be54f2
  1. .github/
  2. contrib/
  3. m4/
  4. openbsd-compat/
  5. regress/
  6. .depend
  7. .git_allowed_signers
  8. .git_allowed_signers.asc
  9. .gitignore
  10. .skipped-commit-ids
  11. addr.c
  12. addr.h
  13. addrmatch.c
  14. atomicio.c
  15. atomicio.h
  16. audit-bsm.c
  17. audit-linux.c
  18. audit.c
  19. audit.h
  20. auth-bsdauth.c
  21. auth-krb5.c
  22. auth-options.c
  23. auth-options.h
  24. auth-pam.c
  25. auth-pam.h
  26. auth-passwd.c
  27. auth-rhosts.c
  28. auth-shadow.c
  29. auth-sia.c
  30. auth-sia.h
  31. auth.c
  32. auth.h
  33. auth2-chall.c
  34. auth2-gss.c
  35. auth2-hostbased.c
  36. auth2-kbdint.c
  37. auth2-methods.c
  38. auth2-none.c
  39. auth2-passwd.c
  40. auth2-pubkey.c
  41. auth2-pubkeyfile.c
  42. auth2.c
  43. authfd.c
  44. authfd.h
  45. authfile.c
  46. authfile.h
  47. bitmap.c
  48. bitmap.h
  49. buildpkg.sh.in
  50. canohost.c
  51. canohost.h
  52. chacha.c
  53. chacha.h
  54. channels.c
  55. channels.h
  56. cipher-aes.c
  57. cipher-aesctr.c
  58. cipher-aesctr.h
  59. cipher-chachapoly-libcrypto.c
  60. cipher-chachapoly.c
  61. cipher-chachapoly.h
  62. cipher.c
  63. cipher.h
  64. cleanup.c
  65. clientloop.c
  66. clientloop.h
  67. compat.c
  68. compat.h
  69. config.guess
  70. config.sub
  71. configure.ac
  72. CREDITS
  73. crypto_api.h
  74. defines.h
  75. dh.c
  76. dh.h
  77. digest-libc.c
  78. digest-openssl.c
  79. digest.h
  80. dispatch.c
  81. dispatch.h
  82. dns.c
  83. dns.h
  84. ed25519.c
  85. ed25519.sh
  86. entropy.c
  87. entropy.h
  88. fatal.c
  89. fixalgorithms
  90. fixpaths
  91. groupaccess.c
  92. groupaccess.h
  93. gss-genr.c
  94. gss-serv-krb5.c
  95. gss-serv.c
  96. hash.c
  97. hmac.c
  98. hmac.h
  99. hostfile.c
  100. hostfile.h
  101. includes.h
  102. INSTALL
  103. install-sh
  104. kex-names.c
  105. kex.c
  106. kex.h
  107. kexc25519.c
  108. kexdh.c
  109. kexecdh.c
  110. kexgen.c
  111. kexgex.c
  112. kexgexc.c
  113. kexgexs.c
  114. kexsntrup761x25519.c
  115. krl.c
  116. krl.h
  117. LICENCE
  118. log.c
  119. log.h
  120. loginrec.c
  121. loginrec.h
  122. logintest.c
  123. mac.c
  124. mac.h
  125. Makefile.in
  126. match.c
  127. match.h
  128. mdoc2man.awk
  129. misc.c
  130. misc.h
  131. mkinstalldirs
  132. moduli
  133. moduli.5
  134. moduli.c
  135. monitor.c
  136. monitor.h
  137. monitor_fdpass.c
  138. monitor_fdpass.h
  139. monitor_wrap.c
  140. monitor_wrap.h
  141. msg.c
  142. msg.h
  143. mux.c
  144. myproposal.h
  145. nchan.c
  146. nchan.ms
  147. nchan2.ms
  148. openssh.xml.in
  149. opensshd.init.in
  150. OVERVIEW
  151. packet.c
  152. packet.h
  153. pathnames.h
  154. pkcs11.h
  155. platform-listen.c
  156. platform-misc.c
  157. platform-pledge.c
  158. platform-tracing.c
  159. platform.c
  160. platform.h
  161. poly1305.c
  162. poly1305.h
  163. progressmeter.c
  164. progressmeter.h
  165. PROTOCOL
  166. PROTOCOL.agent
  167. PROTOCOL.certkeys
  168. PROTOCOL.chacha20poly1305
  169. PROTOCOL.key
  170. PROTOCOL.krl
  171. PROTOCOL.mux
  172. PROTOCOL.sshsig
  173. PROTOCOL.u2f
  174. readconf.c
  175. readconf.h
  176. README
  177. README.dns
  178. README.md
  179. README.platform
  180. README.privsep
  181. README.tun
  182. readpass.c
  183. rijndael.c
  184. rijndael.h
  185. sandbox-capsicum.c
  186. sandbox-darwin.c
  187. sandbox-null.c
  188. sandbox-pledge.c
  189. sandbox-rlimit.c
  190. sandbox-seccomp-filter.c
  191. sandbox-solaris.c
  192. sandbox-systrace.c
  193. scp.1
  194. scp.c
  195. SECURITY.md
  196. servconf.c
  197. servconf.h
  198. serverloop.c
  199. serverloop.h
  200. session.c
  201. session.h
  202. sftp-client.c
  203. sftp-client.h
  204. sftp-common.c
  205. sftp-common.h
  206. sftp-glob.c
  207. sftp-realpath.c
  208. sftp-server-main.c
  209. sftp-server.8
  210. sftp-server.c
  211. sftp-usergroup.c
  212. sftp-usergroup.h
  213. sftp.1
  214. sftp.c
  215. sftp.h
  216. sk-api.h
  217. sk-usbhid.c
  218. smult_curve25519_ref.c
  219. sntrup761.c
  220. sntrup761.sh
  221. srclimit.c
  222. srclimit.h
  223. ssh-add.1
  224. ssh-add.c
  225. ssh-agent.1
  226. ssh-agent.c
  227. ssh-dss.c
  228. ssh-ecdsa-sk.c
  229. ssh-ecdsa.c
  230. ssh-ed25519-sk.c
  231. ssh-ed25519.c
  232. ssh-gss.h
  233. ssh-keygen.1
  234. ssh-keygen.c
  235. ssh-keyscan.1
  236. ssh-keyscan.c
  237. ssh-keysign.8
  238. ssh-keysign.c
  239. ssh-pkcs11-client.c
  240. ssh-pkcs11-helper.8
  241. ssh-pkcs11-helper.c
  242. ssh-pkcs11.c
  243. ssh-pkcs11.h
  244. ssh-rsa.c
  245. ssh-sandbox.h
  246. ssh-sk-client.c
  247. ssh-sk-helper.8
  248. ssh-sk-helper.c
  249. ssh-sk.c
  250. ssh-sk.h
  251. ssh-xmss.c
  252. ssh.1
  253. ssh.c
  254. ssh.h
  255. ssh2.h
  256. ssh_api.c
  257. ssh_api.h
  258. ssh_config
  259. ssh_config.5
  260. sshbuf-getput-basic.c
  261. sshbuf-getput-crypto.c
  262. sshbuf-io.c
  263. sshbuf-misc.c
  264. sshbuf.c
  265. sshbuf.h
  266. sshconnect.c
  267. sshconnect.h
  268. sshconnect2.c
  269. sshd-session.c
  270. sshd.8
  271. sshd.c
  272. sshd_config
  273. sshd_config.5
  274. ssherr.c
  275. ssherr.h
  276. sshkey-xmss.c
  277. sshkey-xmss.h
  278. sshkey.c
  279. sshkey.h
  280. sshlogin.c
  281. sshlogin.h
  282. sshpty.c
  283. sshpty.h
  284. sshsig.c
  285. sshsig.h
  286. sshtty.c
  287. survey.sh.in
  288. TODO
  289. ttymodes.c
  290. ttymodes.h
  291. uidswap.c
  292. uidswap.h
  293. umac.c
  294. umac.h
  295. umac128.c
  296. utf8.c
  297. utf8.h
  298. version.h
  299. xmalloc.c
  300. xmalloc.h
  301. xmss_commons.c
  302. xmss_commons.h
  303. xmss_fast.c
  304. xmss_fast.h
  305. xmss_hash.c
  306. xmss_hash.h
  307. xmss_hash_address.c
  308. xmss_hash_address.h
  309. xmss_wots.c
  310. xmss_wots.h
README.md

Portable OpenSSH

C/C++ CI Fuzzing Status Coverity Status

OpenSSH is a complete implementation of the SSH protocol (version 2) for secure remote login, command execution and file transfer. It includes a client ssh and server sshd, file transfer utilities scp and sftp as well as tools for key generation (ssh-keygen), run-time key storage (ssh-agent) and a number of supporting programs.

This is a port of OpenBSD's OpenSSH to most Unix-like operating systems, including Linux, OS X and Cygwin. Portable OpenSSH polyfills OpenBSD APIs that are not available elsewhere, adds sshd sandboxing for more operating systems and includes support for OS-native authentication and auditing (e.g. using PAM).

Documentation

The official documentation for OpenSSH are the man pages for each tool:

Stable Releases

Stable release tarballs are available from a number of download mirrors. We recommend the use of a stable release for most users. Please read the release notes for details of recent changes and potential incompatibilities.

Building Portable OpenSSH

Dependencies

Portable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.

libcrypto from either LibreSSL or OpenSSL may also be used. OpenSSH may be built without either of these, but the resulting binaries will have only a subset of the cryptographic algorithms normally available.

zlib is optional; without it transport compression is not supported.

FIDO security token support needs libfido2 and its dependencies and will be enabled automatically if they are found.

In addition, certain platforms and build-time options may require additional dependencies; see README.platform for details about your platform.

Building a release

Releases include a pre-built copy of the configure script and may be built using:

tar zxvf openssh-X.YpZ.tar.gz
cd openssh
./configure # [options]
make && make tests

See the Build-time Customisation section below for configure options. If you plan on installing OpenSSH to your system, then you will usually want to specify destination paths.

Building from git

If building from git, you'll need autoconf installed to build the configure script. The following commands will check out and build portable OpenSSH from git:

git clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
cd openssh-portable
autoreconf
./configure
make && make tests

Build-time Customisation

There are many build-time customisation options available. All Autoconf destination path flags (e.g. --prefix) are supported (and are usually required if you want to install OpenSSH).

For a full list of available flags, run ./configure --help but a few of the more frequently-used ones are described below. Some of these flags will require additional libraries and/or headers be installed.

FlagMeaning
--with-pamEnable PAM support. OpenPAM, Linux PAM and Solaris PAM are supported.
--with-libeditEnable libedit support for sftp.
--with-kerberos5Enable Kerberos/GSSAPI support. Both Heimdal and MIT Kerberos implementations are supported.
--with-selinuxEnable SELinux support.

Development

Portable OpenSSH development is discussed on the openssh-unix-dev mailing list (archive mirror). Bugs and feature requests are tracked on our Bugzilla.

Reporting bugs

Non-security bugs may be reported to the developers via Bugzilla or via the mailing list above. Security bugs should be reported to openssh@openssh.com.