Name Date Size #Lines LOC

..--

.github/H--1,9181,643

contrib/H--5,2803,662

m4/H--233224

openbsd-compat/H--21,91214,177

regress/H--29,57623,826

.dependH A D14-May-2026130 KiB178176

.git_allowed_signersH A D26-Aug-20251.5 KiB128

.git_allowed_signers.ascH A D19-Feb-2025833 1715

.gitignoreH A D14-May-2026459 4038

.skipped-commit-idsH A D14-May-20264.4 KiB7673

CREDITSH A D08-Sep-20215.4 KiB10398

ChangeLogH A D14-May-2026344.9 KiB10,6286,812

FREEBSD-upgradeH A D15-May-20266.7 KiB203131

INSTALLH A D14-May-202610.2 KiB299206

LICENCEH A D19-Feb-202520.6 KiB413366

Makefile.inH A D14-May-202632.3 KiB852719

OVERVIEWH A D08-Sep-20216.2 KiB163119

PROTOCOLH A D14-May-202624.7 KiB722524

PROTOCOL.agentH A D12-May-20264 KiB10882

PROTOCOL.keyH A D19-Feb-20251.6 KiB7253

PROTOCOL.krlH A D11-Aug-20236.9 KiB223154

PROTOCOL.muxH A D18-Mar-20248.8 KiB297218

PROTOCOL.sshsigH A D08-Sep-20213.3 KiB10174

PROTOCOL.u2fH A D08-Sep-202110.8 KiB310243

READMEH A D14-May-20262 KiB5035

README.dnsH A D08-Sep-20211.6 KiB4830

README.mdH A D14-May-20265.5 KiB9059

README.platformH A D18-Mar-20244 KiB9874

README.privsepH A D08-Sep-20212.2 KiB5239

README.tunH A D30-Sep-20064.8 KiB13398

SECURITY.mdH A D13-Apr-2022163 63

TODOH A D12-May-20262.5 KiB8161

aclocal.m4H A D06-Feb-2023694 1611

addr.cH A D14-May-202610.1 KiB511388

addr.hH A D14-May-20261.9 KiB5432

addrmatch.cH A D14-May-20264.3 KiB167106

atomicio.cH A D12-May-20264.6 KiB174123

atomicio.hH A D08-Sep-20212.2 KiB5414

audit-bsm.cH A D14-May-202611.7 KiB456322

audit-linux.cH A D12-May-20263.5 KiB12779

audit.cH A D08-Sep-20215.7 KiB185105

audit.hH A D08-Sep-20212.3 KiB5828

auth-bsdauth.cH A D14-May-20263.5 KiB13691

auth-krb5.cH A D14-May-20266.9 KiB274201

auth-options.cH A D14-May-202623.5 KiB911748

auth-options.hH A D08-Sep-20213.1 KiB10740

auth-pam.cH A D14-May-202633.7 KiB1,3231,024

auth-pam.hH A D14-May-20261.9 KiB4820

auth-passwd.cH A D12-May-20266.4 KiB224147

auth-rhosts.cH A D12-May-20269.1 KiB336222

auth-shadow.cH A D12-May-20264.2 KiB14286

auth-sia.cH A D11-Sep-20183.2 KiB11671

auth-sia.hH A D05-Jun-20051.4 KiB324

auth.cH A D14-May-202621.6 KiB792630

auth.hH A D14-May-20268.1 KiB247155

auth2-chall.cH A D14-May-20269.4 KiB365289

auth2-gss.cH A D14-May-20269.2 KiB332235

auth2-hostbased.cH A D14-May-20268.3 KiB269212

auth2-kbdint.cH A D19-Feb-20252.2 KiB7235

auth2-methods.cH A D19-Feb-20253.3 KiB13597

auth2-none.cH A D14-May-20262.1 KiB7036

auth2-passwd.cH A D19-Feb-20252.4 KiB8045

auth2-pubkey.cH A D14-May-202625.3 KiB880725

auth2-pubkeyfile.cH A D14-May-202614.2 KiB514375

auth2.cH A D14-May-202622 KiB809625

authfd.cH A D14-May-202620.8 KiB825628

authfd.hH A D14-May-20264.2 KiB12580

authfile.cH A D14-May-202612.1 KiB515383

authfile.hH A D08-Sep-20212.4 KiB5522

bitmap.cH A D11-May-20184.4 KiB215171

bitmap.hH A D11-May-20181.9 KiB5815

blocklist.cH A D12-Oct-20252.8 KiB9850

blocklist_client.hH A D12-Oct-20252.1 KiB6220

buildpkg.sh.inH A D26-Aug-202517.6 KiB678526

canohost.cH A D14-May-20264.7 KiB209146

canohost.hH A D02-Mar-2017842 279

chacha.cH A D14-May-20265.3 KiB219188

chacha.hH A D08-Sep-2021994 3722

channels.cH A D14-May-2026149.3 KiB5,4424,292

channels.hH A D14-May-202615.7 KiB417271

cipher-aes.cH A D11-Aug-20234.5 KiB162119

cipher-aesctr.cH A D14-May-20262.1 KiB8450

cipher-aesctr.hH A D22-Jan-20161.3 KiB3613

cipher-chachapoly-libcrypto.cH A D14-May-20264.9 KiB164111

cipher-chachapoly.cH A D11-Aug-20234.1 KiB13986

cipher-chachapoly.hH A D08-Sep-20211.6 KiB4117

cipher.cH A D14-May-202612.7 KiB496396

cipher.hH A D05-Jan-20243.2 KiB7834

cleanup.cH A D30-Sep-20061 KiB3310

clientloop.cH A D14-May-202683.2 KiB2,8822,119

clientloop.hH A D14-May-20263.8 KiB8633

compat.cH A D14-May-20265.1 KiB167130

compat.hH A D16-Mar-20232.5 KiB6622

config.guessH A D06-Feb-202348.8 KiB1,7751,548

config.hH A D18-May-202658.3 KiB2,122393

config.subH A D06-Feb-202335 KiB1,9081,720

configure.acH A D14-May-2026163.5 KiB6,0655,697

crypto_api.hH A D14-May-20262.3 KiB8663

defines.hH A D14-May-202625.6 KiB1,003761

dh.cH A D14-May-202615.4 KiB505403

dh.hH A D08-Sep-20212.7 KiB8536

digest-libc.cH A D14-May-20266.1 KiB268216

digest-openssl.cH A D08-Sep-20214.9 KiB208160

digest.hH A D09-May-20182.5 KiB7132

dispatch.cH A D14-May-20263.5 KiB13595

dispatch.hH A D14-May-20262 KiB5017

dns.cH A D14-May-20268.7 KiB338239

dns.hH A D12-May-20262 KiB5925

ed25519-openssl.cH A D14-May-20265.4 KiB208149

ed25519.cH A D14-May-2026196.9 KiB2,0351,762

ed25519.shH A D19-Feb-20254.1 KiB12095

entropy.cH A D14-May-20263.5 KiB13273

entropy.hH A D14-May-20261.4 KiB346

fatal.cH A D08-Sep-20211.8 KiB4714

fixalgorithmsH A D30-Oct-2013422 2713

fixpathsH A D23-Apr-2003499 2312

freebsd-configure.shH A D17-May-20261.9 KiB6538

freebsd-namespace.shH A D23-Apr-20221.9 KiB8456

groupaccess.cH A D12-May-20263.8 KiB14690

groupaccess.hH A D01-Aug-20081.5 KiB367

gss-genr.cH A D14-May-20267.9 KiB304210

gss-serv-krb5.cH A D14-May-20265.6 KiB212143

gss-serv.cH A D14-May-202610.5 KiB412262

hmac.cH A D14-May-20265.1 KiB198149

hmac.hH A D22-Jan-20161.6 KiB3915

hostfile.cH A D14-May-202625.7 KiB983767

hostfile.hH A D08-Sep-20214.4 KiB12475

includes.hH A D26-Aug-20253.9 KiB185141

install-shH A D06-Feb-202315 KiB542352

kex-names.cH A D14-May-20268.5 KiB337251

kex.cH A D14-May-202638.1 KiB1,4441,224

kex.hH A D14-May-20269.7 KiB296236

kexc25519.cH A D19-Feb-20255.8 KiB200149

kexdh.cH A D14-May-20265 KiB202159

kexecdh.cH A D14-May-20266.1 KiB239187

kexgen.cH A D14-May-202610.9 KiB385317

kexgex.cH A D14-May-20263.7 KiB10570

kexgexc.cH A D14-May-20267 KiB241186

kexgexs.cH A D14-May-20266.4 KiB216159

kexmlkem768x25519.cH A D12-May-20268.9 KiB280225

kexsntrup761x25519.cH A D19-Feb-20257.7 KiB256202

krb5_config.hH A D14-May-2026658 2019

krl.cH A D14-May-202635.6 KiB1,3891,159

krl.hH A D14-May-20262.7 KiB6838

libcrux_mlkem768_sha3.hH A D14-May-2026417.7 KiB11,7536,822

log.cH A D14-May-202616.7 KiB657507

log.hH A D26-Aug-20257.1 KiB150113

loginrec.cH A D14-May-202641.7 KiB1,7591,148

loginrec.hH A D14-May-20264.7 KiB13957

logintest.cH A D12-May-20268.5 KiB307212

mac.cH A D14-May-20267 KiB254199

mac.hH A D14-May-20262 KiB5424

match.cH A D19-Feb-20259.6 KiB368206

match.hH A D08-Sep-20211.2 KiB3114

mdoc2man.awkH A D14-May-20268.5 KiB379349

misc-agent.cH A D14-May-20268.9 KiB358288

misc.cH A D14-May-202669.2 KiB3,2282,518

misc.hH A D14-May-20269.8 KiB280209

mkinstalldirsH A D11-May-2018633 3923

mlkem768.shH A D14-May-20266.4 KiB220184

moduliH A D14-May-2026748.3 KiB587586

moduli.5H A D19-Oct-20223.6 KiB127126

moduli.cH A D14-May-202619.3 KiB772479

monitor.cH A D14-May-202656.1 KiB2,1191,668

monitor.hH A D14-May-20264.2 KiB10763

monitor_fdpass.cH A D14-May-20264.5 KiB177136

monitor_fdpass.hH A D01-Aug-20081.5 KiB355

monitor_wrap.cH A D14-May-202631.4 KiB1,2521,000

monitor_wrap.hH A D14-May-20264.3 KiB11569

msg.cH A D14-May-20262.7 KiB9358

msg.hH A D22-Jan-20161.5 KiB336

mux.cH A D14-May-202666.1 KiB2,4902,076

myproposal.hH A D14-May-20263.9 KiB12284

nchan.cH A D14-May-202611.9 KiB444343

nchan.msH A D30-Oct-20133.9 KiB10074

nchan2.msH A D30-Oct-20133.4 KiB8964

openssh.xml.inH A D30-Oct-20132.8 KiB9161

opensshd.init.inH A D19-Dec-20211.2 KiB6946

packet.cH A D14-May-202682.3 KiB3,1072,391

packet.hH A D14-May-20267.6 KiB229164

pathnames.hH A D14-May-20266.1 KiB19077

pkcs11.hH A D12-May-202660.8 KiB1,9021,616

platform-listen.cH A D26-Aug-20252.2 KiB10266

platform-misc.cH A D09-May-20181.1 KiB3613

platform-pledge.cH A D14-Mar-20161.9 KiB7227

platform-tracing.cH A D09-Nov-20222.5 KiB7747

platform.cH A D12-May-20265.3 KiB215143

platform.hH A D26-Aug-20251.5 KiB4120

poly1305.cH A D12-May-20264.5 KiB158119

poly1305.hH A D22-Jan-2016645 2311

progressmeter.cH A D14-May-20267.5 KiB304219

progressmeter.hH A D08-Sep-20211.5 KiB293

readconf.cH A D14-May-2026111.4 KiB3,9583,361

readconf.hH A D14-May-20269.2 KiB265196

readpass.cH A D14-May-20268.3 KiB331254

rijndael.cH A D14-May-202651.6 KiB1,1301,009

rijndael.hH A D13-Apr-20222 KiB5620

sandbox-capsicum.cH A D12-May-20263 KiB11172

sandbox-darwin.cH A D12-May-20262.2 KiB8546

sandbox-null.cH A D26-Aug-20251.4 KiB6127

sandbox-rlimit.cH A D26-Aug-20252.1 KiB8247

sandbox-seccomp-filter.cH A D14-May-202617.1 KiB579481

sandbox-solaris.cH A D26-Aug-20252.7 KiB10166

scp.1H A D12-May-20268.8 KiB368367

scp.cH A D14-May-202653.7 KiB2,2741,856

servconf.cH A D14-May-2026105.8 KiB3,4863,061

servconf.hH A D14-May-202612.2 KiB348250

serverloop.cH A D14-May-202628.3 KiB923707

serverloop.hH A D09-May-20181,000 295

session.cH A D14-May-202666.8 KiB2,7021,999

session.hH A D06-Feb-20232.6 KiB8548

sftp-client.cH A D14-May-202678.7 KiB3,0042,435

sftp-client.hH A D14-May-20266.5 KiB20379

sftp-common.cH A D14-May-20266.9 KiB264210

sftp-common.hH A D14-May-20262.1 KiB5420

sftp-glob.cH A D14-May-20264.3 KiB180111

sftp-realpath.cH A D19-Dec-20216 KiB226147

sftp-server-main.cH A D19-Oct-20221.4 KiB5327

sftp-server.8H A D08-Sep-20215 KiB171170

sftp-server.cH A D14-May-202651.7 KiB2,1031,787

sftp-usergroup.cH A D14-May-20265.5 KiB241188

sftp-usergroup.hH A D19-Oct-20221.1 KiB264

sftp.1H A D26-Aug-202517.6 KiB768767

sftp.cH A D14-May-202664.6 KiB2,7212,241

sftp.hH A D01-Aug-20083.3 KiB10255

sk-api.hH A D12-May-20262.8 KiB10263

sk-usbhid.cH A D12-May-202638.4 KiB1,4821,322

sk_config.hH A D19-Oct-2022338 109

smult_curve25519_ref.cH A D03-Jun-20146.7 KiB266227

sntrup761.cH A D14-May-202677.9 KiB2,1521,952

sntrup761.shH A D14-May-20264.4 KiB127102

srclimit.cH A D14-May-202615 KiB503422

srclimit.hH A D14-May-20261.7 KiB4321

ssh-add.1H A D14-May-202610.9 KiB361360

ssh-add.cH A D14-May-202627.2 KiB1,064906

ssh-agent.1H A D14-May-20269.7 KiB335334

ssh-agent.cH A D14-May-202669.8 KiB2,6512,228

ssh-ecdsa-sk.cH A D14-May-202614.5 KiB507402

ssh-ecdsa.cH A D14-May-202614.3 KiB586489

ssh-ed25519-sk.cH A D14-May-20267.5 KiB287237

ssh-ed25519.cH A D14-May-20268.2 KiB336278

ssh-gss.hH A D19-Feb-20254.7 KiB13991

ssh-keygen.1H A D14-May-202641 KiB1,3531,352

ssh-keygen.cH A D14-May-2026105.7 KiB3,9303,427

ssh-keyscan.1H A D12-May-20264.7 KiB189188

ssh-keyscan.cH A D14-May-202618.6 KiB828687

ssh-keysign.8H A D19-Feb-20252.9 KiB9291

ssh-keysign.cH A D14-May-20268 KiB308229

ssh-pkcs11-client.cH A D14-May-202612.1 KiB494399

ssh-pkcs11-helper.8H A D19-Oct-20221.7 KiB7271

ssh-pkcs11-helper.cH A D14-May-20268 KiB325256

ssh-pkcs11.cH A D14-May-202659.1 KiB2,3301,913

ssh-pkcs11.hH A D14-May-20261.8 KiB5024

ssh-rsa.cH A D14-May-202616.4 KiB668563

ssh-sandbox.hH A D26-Aug-2025996 234

ssh-sk-client.cH A D14-May-202611.8 KiB501427

ssh-sk-helper.8H A D19-Oct-20221.7 KiB7271

ssh-sk-helper.cH A D14-May-202610.3 KiB384301

ssh-sk.cH A D12-May-202622.8 KiB893780

ssh-sk.hH A D13-Apr-20222.7 KiB8027

ssh.1H A D14-May-202646.6 KiB1,8051,804

ssh.cH A D14-May-202674 KiB2,5211,971

ssh.hH A D26-Aug-20252.5 KiB9418

ssh2.hH A D05-Jan-20245.8 KiB18181

ssh_api.cH A D14-May-202615.2 KiB593472

ssh_api.hH A D14-May-20264.3 KiB13731

ssh_configH A D12-May-20261.5 KiB4641

ssh_config.5H A D14-May-202669.8 KiB2,4762,475

ssh_namespace.hH A D14-May-202654 KiB1,0491,044

sshbuf-getput-basic.cH A D14-May-202613 KiB670559

sshbuf-getput-crypto.cH A D14-May-20264.6 KiB191149

sshbuf-io.cH A D08-Sep-20212.7 KiB11886

sshbuf-misc.cH A D14-May-20268 KiB360305

sshbuf.cH A D14-May-202610.4 KiB448352

sshbuf.hH A D14-May-202614.8 KiB431178

sshconnect.cH A D14-May-202650.7 KiB1,7731,378

sshconnect.hH A D14-May-20263.4 KiB10460

sshconnect2.cH A D13-May-202665.5 KiB2,3791,918

sshd-auth.cH A D17-May-202622.3 KiB871649

sshd-debug.shH A D26-Aug-20251.4 KiB5331

sshd-session.cH A D17-May-202638 KiB1,381971

sshd.8H A D12-May-202632.2 KiB1,0541,053

sshd.cH A D14-May-202654.8 KiB2,0011,487

sshd_configH A D14-May-20263.5 KiB125100

sshd_config.5H A D14-May-202665.3 KiB2,3192,318

ssherr-libcrypto.cH A D14-May-20261.6 KiB6036

ssherr-nolibcrypto.cH A D14-May-2026946 277

ssherr.cH A D14-May-20265.2 KiB155135

ssherr.hH A D14-May-20263.4 KiB9266

sshkey.cH A D14-May-202690.2 KiB3,6933,068

sshkey.hH A D14-May-202612.1 KiB345261

sshlogin.cH A D14-May-20265.3 KiB17499

sshlogin.hH A D30-Oct-2013935 248

sshpty.cH A D14-May-20265.6 KiB229161

sshpty.hH A D06-Mar-20171 KiB2910

sshsig.cH A D14-May-202629.5 KiB1,1651,008

sshsig.hH A D13-Apr-20224 KiB11236

sshtty.cH A D28-Apr-20102.9 KiB9752

survey.sh.inH A D30-Oct-20131.7 KiB7049

ttymodes.cH A D14-May-20269.7 KiB450327

ttymodes.hH A D09-May-20184.9 KiB170104

uidswap.cH A D14-May-20267.2 KiB238158

uidswap.hH A D11-Sep-2018680 183

umac.cH A D14-May-202645 KiB1,286771

umac.hH A D13-Apr-20224.6 KiB13042

umac128.cH A D23-Apr-2022398 1812

utf8.cH A D08-Sep-20218.2 KiB356240

utf8.hH A D08-Sep-20211.3 KiB2911

version.hH A D14-May-2026220 94

xmalloc.cH A D12-May-20262.4 KiB11784

xmalloc.hH A D08-Sep-20211.1 KiB289

README

1See https://www.openssh.com/releasenotes.html#10.3p1 for the release
2notes.
3
4Please read https://www.openssh.com/report.html for bug reporting
5instructions and note that we do not use Github for bug reporting.
6
7This is the port of OpenBSD's excellent OpenSSH[0] to Linux and other
8Unices.
9
10OpenSSH is based on the last free version of Tatu Ylonen's sample
11implementation with all patent-encumbered algorithms removed (to external
12libraries), all known security bugs fixed, new features reintroduced and
13many other clean-ups.  OpenSSH was created by Aaron Campbell, Bob Beck,
14Markus Friedl, Niels Provos, Theo de Raadt, and Dug Song, and has been
15developed and maintained by Andre Lucas, Ben Lindstom, Damien Miller,
16Darren Tucker and Tim Rice. It has a homepage at https://www.openssh.com/
17
18This port consists of the re-introduction of autoconf support, PAM
19support, EGD/PRNGD support and replacements for OpenBSD library
20functions that are (regrettably) absent from other unices. This port
21has been best tested on AIX, Cygwin, HP-UX, Linux, MacOS/X,
22FreeBSD, NetBSD, OpenBSD, OpenServer, Solaris and UnixWare.
23
24This version actively tracks changes in the OpenBSD CVS repository.
25
26There is now several mailing lists for this port of OpenSSH. Please
27refer to https://www.openssh.com/list.html for details on how to join.
28
29Please send bug reports and patches to https://bugzilla.mindrot.org or
30the mailing list openssh-unix-dev@mindrot.org.  To mitigate spam, the
31list only allows posting from subscribed addresses.  Code contribution
32are welcomed, but please follow the OpenBSD style guidelines[1].
33
34Please refer to the INSTALL document for information on dependencies and
35how to install OpenSSH on your system.
36
37Damien Miller <djm@mindrot.org>
38
39Miscellania -
40
41This version of OpenSSH is based upon code retrieved from the OpenBSD CVS
42repository which in turn was based on the last free sample implementation
43released by Tatu Ylonen.
44
45References -
46
47[0] https://www.openssh.com/
48[1] https://man.openbsd.org/style.9
49
50

README.dns

1How to verify host keys using OpenSSH and DNS
2---------------------------------------------
3
4OpenSSH contains support for verifying host keys using DNS as described
5in https://tools.ietf.org/html/rfc4255. The document contains very brief
6instructions on how to use this feature. Configuring DNS is out of the
7scope of this document.
8
9
10(1) Server: Generate and publish the DNS RR
11
12To create a DNS resource record (RR) containing a fingerprint of the
13public host key, use the following command:
14
15	ssh-keygen -r hostname -f keyfile -g
16
17where "hostname" is your fully qualified hostname and "keyfile" is the
18file containing the public host key file. If you have multiple keys,
19you should generate one RR for each key.
20
21In the example above, ssh-keygen will print the fingerprint in a
22generic DNS RR format parsable by most modern name server
23implementations. If your nameserver has support for the SSHFP RR
24you can omit the -g flag and ssh-keygen will print a standard SSHFP RR.
25
26To publish the fingerprint using the DNS you must add the generated RR
27to your DNS zone file and sign your zone.
28
29
30(2) Client: Enable ssh to verify host keys using DNS
31
32To enable the ssh client to verify host keys using DNS, you have to
33add the following option to the ssh configuration file
34($HOME/.ssh/config or /etc/ssh/ssh_config):
35
36    VerifyHostKeyDNS yes
37
38Upon connection the client will try to look up the fingerprint RR
39using DNS. If the fingerprint received from the DNS server matches
40the remote host key, the user will be notified.
41
42
43	Jakob Schlyter
44	Wesley Griffin
45
46
47$OpenBSD: README.dns,v 1.2 2003/10/14 19:43:23 jakob Exp $
48

README.md

1# Portable OpenSSH
2
3[![C/C++ CI](../../actions/workflows/c-cpp.yml/badge.svg)](../../actions/workflows/c-cpp.yml)
4[![VM CI](../../actions/workflows/vm.yml/badge.svg)](../../actions/workflows/vm.yml)
5[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml)
6[![CIFuzz](../../actions/workflows/cifuzz.yml/badge.svg)](../../actions/workflows/cifuzz.yml)
7[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://issues.oss-fuzz.com/issues?q="Project:+openssh"+is:open)
8[![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable)
9
10OpenSSH 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.
11
12This is a port of OpenBSD's [OpenSSH](https://openssh.com) 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).
13
14## Documentation
15
16The official documentation for OpenSSH are the man pages for each tool:
17
18* [ssh(1)](https://man.openbsd.org/ssh.1)
19* [sshd(8)](https://man.openbsd.org/sshd.8)
20* [ssh-keygen(1)](https://man.openbsd.org/ssh-keygen.1)
21* [ssh-agent(1)](https://man.openbsd.org/ssh-agent.1)
22* [scp(1)](https://man.openbsd.org/scp.1)
23* [sftp(1)](https://man.openbsd.org/sftp.1)
24* [ssh-keyscan(8)](https://man.openbsd.org/ssh-keyscan.8)
25* [sftp-server(8)](https://man.openbsd.org/sftp-server.8)
26
27## Stable Releases
28
29Stable release tarballs are available from a number of [download mirrors](https://www.openssh.com/portable.html#downloads). We recommend the use of a stable release for most users. Please read the [release notes](https://www.openssh.com/releasenotes.html) for details of recent changes and potential incompatibilities.
30
31## Building Portable OpenSSH
32
33### Dependencies
34
35Portable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.
36
37``libcrypto`` from one of [LibreSSL](https://www.libressl.org/), [OpenSSL](https://www.openssl.org), [AWS-LC](https://github.com/aws/aws-lc) or [BoringSSL](https://github.com/google/boringssl) 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.
38
39[zlib](https://www.zlib.net/) is optional; without it transport compression is not supported.
40
41FIDO security token support needs [libfido2](https://github.com/Yubico/libfido2) and its dependencies and will be enabled automatically if they are found.
42
43In addition, certain platforms and build-time options may require additional dependencies; see README.platform for details about your platform.
44
45### Building a release
46
47Release tarballs and release branches in git include a pre-built copy of the ``configure`` script and may be built using:
48
49```
50tar zxvf openssh-X.YpZ.tar.gz
51cd openssh
52./configure # [options]
53make && make tests
54```
55
56See the [Build-time Customisation](#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.
57
58### Building from git
59
60If building from the git master branch, you'll need [autoconf](https://www.gnu.org/software/autoconf/) installed to build the ``configure`` script. The following commands will check out and build portable OpenSSH from git:
61
62```
63git clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
64cd openssh-portable
65autoreconf
66./configure
67make && make tests
68```
69
70### Build-time Customisation
71
72There 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).
73
74For 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.
75
76Flag | Meaning
77--- | ---
78``--with-pam`` | Enable [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) support. [OpenPAM](https://www.openpam.org/), [Linux PAM](http://www.linux-pam.org/) and Solaris PAM are supported.
79``--with-libedit`` | Enable [libedit](https://www.thrysoee.dk/editline/) support for sftp.
80``--with-kerberos5`` | Enable Kerberos/GSSAPI support. Both [Heimdal](https://www.h5l.org/) and [MIT](https://web.mit.edu/kerberos/) Kerberos implementations are supported.
81``--with-selinux`` | Enable [SELinux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux) support.
82
83## Development
84
85Portable OpenSSH development is discussed on the [openssh-unix-dev mailing list](https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev) ([archive mirror](https://marc.info/?l=openssh-unix-dev)). Bugs and feature requests are tracked on our [Bugzilla](https://bugzilla.mindrot.org/).
86
87## Reporting bugs
88
89_Non-security_ bugs may be reported to the developers via [Bugzilla](https://bugzilla.mindrot.org/) or via the mailing list above. Security bugs should be reported to [openssh@openssh.com](mailto:openssh.openssh.com).
90

README.platform

1This file contains notes about OpenSSH on specific platforms.
2
3AIX
4
5Beginning with OpenSSH 3.8p1, sshd will honour an account's password
6expiry settings, where prior to that it did not.  Because of this,
7it's possible for sites that have used OpenSSH's sshd exclusively to
8have accounts which have passwords expired longer than the inactive time
9(ie the "Weeks between password EXPIRATION and LOCKOUT" setting in SMIT
10or the maxexpired chuser attribute).
11
12Accounts in this state must have their passwords reset manually by the
13administrator.  As a precaution, it is recommended that the administrative
14passwords be reset before upgrading from OpenSSH <3.8.
15
16As of OpenSSH 4.0p1, configure will attempt to detect if your version
17and maintenance level of AIX has a working getaddrinfo, and will use it
18if found.  This will enable IPv6 support.  If for some reason configure
19gets it wrong, or if you want to build binaries to work on earlier MLs
20than the build host then you can add "-DBROKEN_GETADDRINFO" to CFLAGS
21to force the previous IPv4-only behaviour.
22
23IPv6 known to work: 5.1ML7 5.2ML2 5.2ML5
24IPv6 known broken: 4.3.3ML11 5.1ML4
25
26If you wish to use dynamic libraries that aren't in the normal system
27locations (eg IBM's OpenSSL and zlib packages) then you will need to
28define the environment variable blibpath before running configure, eg
29
30blibpath=/lib:/usr/lib:/opt/freeware/lib ./configure \
31  --with-ssl-dir=/opt/freeware --with-zlib=/opt/freeware
32
33If sshd is built with the WITH_AIXAUTHENTICATE option (which is enabled
34by default) then sshd checks that users are permitted via the
35loginrestrictions() function, in particular that the user has the
36"rlogin" attribute set.  This check is not done for the root account,
37instead the PermitRootLogin setting in sshd_config is used.
38
39If you are using the IBM compiler you probably want to use CC=xlc rather
40than the default of cc.
41
42
43Cygwin
44------
45To build on Cygwin, OpenSSH requires the following packages:
46gcc, gcc-mingw-core, mingw-runtime, binutils, make, openssl,
47openssl-devel, zlib, minres, minires-devel.
48
49
50Darwin and MacOS X
51------------------
52Darwin does not provide a tun(4) driver required for OpenSSH-based
53virtual private networks. The BSD manpage still exists, but the driver
54has been removed in recent releases of Darwin and MacOS X.
55
56Tunnel support is known to work with Darwin 8 and MacOS X 10.4 in
57Point-to-Point (Layer 3) and Ethernet (Layer 2) mode using a third
58party driver. More information is available at:
59	https://tuntaposx.sourceforge.net
60
61Recent Darwin/MacOS X versions are likely unsupported.
62
63Linux
64-----
65
66Some Linux distributions (including Red Hat/Fedora/CentOS) include
67headers and library links in the -devel RPMs rather than the main
68binary RPMs. If you get an error about headers, or complaining about a
69missing prerequisite then you may need to install the equivalent
70development packages.  On Redhat based distros these may be openssl-devel,
71zlib-devel and pam-devel, on Debian based distros these may be
72libssl-dev, libz-dev and libpam-dev.
73
74
75Solaris
76-------
77If you enable BSM auditing on Solaris, you need to update audit_event(4)
78for praudit(1m) to give sensible output.  The following line needs to be
79added to /etc/security/audit_event:
80
81	32800:AUE_openssh:OpenSSH login:lo
82
83The BSM audit event range available for third party TCB applications is
8432768 - 65535.  Event number 32800 has been chosen for AUE_openssh.
85There is no official registry of 3rd party event numbers, so if this
86number is already in use on your system, you may change it at build time
87by configure'ing --with-cflags=-DAUE_openssh=32801 then rebuilding.
88
89
90Platforms using PAM
91-------------------
92As of OpenSSH 4.3p1, sshd will no longer check /etc/nologin itself when
93PAM is enabled.  To maintain existing behaviour, pam_nologin should be
94added to sshd's session stack which will prevent users from starting shell
95sessions.  Alternatively, pam_nologin can be added to either the auth or
96account stacks which will prevent authentication entirely, but will still
97return the output from pam_nologin to the client.
98

README.privsep

1Privilege separation, or privsep, is method in OpenSSH by which
2operations that require root privilege are performed by a separate
3privileged monitor process.  Its purpose is to prevent privilege
4escalation by containing corruption to an unprivileged process.
5More information is available at:
6	http://www.citi.umich.edu/u/provos/ssh/privsep.html
7
8Privilege separation is now mandatory.  During the pre-authentication
9phase sshd will chroot(2) to "/var/empty" and change its privileges to the
10"sshd" user and its primary group.  sshd is a pseudo-account that should
11not be used by other daemons, and must be locked and should contain a
12"nologin" or invalid shell.
13
14You should do something like the following to prepare the privsep
15preauth environment:
16
17	# mkdir /var/empty
18	# chown root:sys /var/empty
19	# chmod 755 /var/empty
20	# groupadd sshd
21	# useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/false sshd
22
23/var/empty should not contain any files.
24
25configure supports the following options to change the default
26privsep user and chroot directory:
27
28  --with-privsep-path=xxx Path for privilege separation chroot
29  --with-privsep-user=user Specify non-privileged user for privilege separation
30
31PAM-enabled OpenSSH is known to function with privsep on AIX, FreeBSD,
32HP-UX (including Trusted Mode), Linux, NetBSD and Solaris.
33
34On Cygwin, Tru64 Unix and OpenServer only the pre-authentication part
35of privsep is supported.  Post-authentication privsep is disabled
36automatically (so you won't see the additional process mentioned below).
37
38Note that for a normal interactive login with a shell, enabling privsep
39will require 1 additional process per login session.
40
41Given the following process listing (from HP-UX):
42
43     UID   PID  PPID  C    STIME TTY       TIME COMMAND
44    root  1005     1  0 10:45:17 ?         0:08 /opt/openssh/sbin/sshd -u0
45    root  6917  1005  0 15:19:16 ?         0:00 sshd: stevesk [priv]
46 stevesk  6919  6917  0 15:19:17 ?         0:03 sshd: stevesk@2
47 stevesk  6921  6919  0 15:19:17 pts/2     0:00 -bash
48
49process 1005 is the sshd process listening for new connections.
50process 6917 is the privileged monitor process, 6919 is the user owned
51sshd process and 6921 is the shell process.
52

README.tun

1How to use OpenSSH-based virtual private networks
2-------------------------------------------------
3
4OpenSSH contains support for VPN tunneling using the tun(4) network
5tunnel pseudo-device which is available on most platforms, either for
6layer 2 or 3 traffic.
7
8The following brief instructions on how to use this feature use
9a network configuration specific to the OpenBSD operating system.
10
11(1) Server: Enable support for SSH tunneling
12
13To enable the ssh server to accept tunnel requests from the client, you
14have to add the following option to the ssh server configuration file
15(/etc/ssh/sshd_config):
16
17	PermitTunnel yes
18
19Restart the server or send the hangup signal (SIGHUP) to let the server
20reread it's configuration.
21
22(2) Server: Restrict client access and assign the tunnel
23
24The OpenSSH server simply uses the file /root/.ssh/authorized_keys to
25restrict the client to connect to a specified tunnel and to
26automatically start the related interface configuration command. These
27settings are optional but recommended:
28
29	tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... reyk@openbsd.org
30
31(3) Client: Configure the local network tunnel interface
32
33Use the hostname.if(5) interface-specific configuration file to set up
34the network tunnel configuration with OpenBSD. For example, use the
35following configuration in /etc/hostname.tun0 to set up the layer 3
36tunnel on the client:
37
38	inet 192.168.5.1 255.255.255.252 192.168.5.2
39
40OpenBSD also supports layer 2 tunneling over the tun device by adding
41the link0 flag:
42
43	inet 192.168.1.78 255.255.255.0 192.168.1.255 link0
44
45Layer 2 tunnels can be used in combination with an Ethernet bridge(4)
46interface, like the following example for /etc/bridgename.bridge0:
47
48	add tun0
49	add sis0
50	up
51
52(4) Client: Configure the OpenSSH client
53
54To establish tunnel forwarding for connections to a specified
55remote host by default, use the following ssh client configuration for
56the privileged user (in /root/.ssh/config):
57
58	Host sshgateway
59		Tunnel yes
60		TunnelDevice 0:any
61		PermitLocalCommand yes
62	        LocalCommand sh /etc/netstart tun0
63
64A more complicated configuration is possible to establish a tunnel to
65a remote host which is not directly accessible by the client.
66The following example describes a client configuration to connect to
67the remote host over two ssh hops in between. It uses the OpenSSH
68ProxyCommand in combination with the nc(1) program to forward the final
69ssh tunnel destination over multiple ssh sessions.
70
71	Host access.somewhere.net
72	        User puffy
73	Host dmzgw
74	        User puffy
75	        ProxyCommand ssh access.somewhere.net nc dmzgw 22
76	Host sshgateway
77	        Tunnel Ethernet
78	        TunnelDevice 0:any
79	        PermitLocalCommand yes
80	        LocalCommand sh /etc/netstart tun0
81	        ProxyCommand ssh dmzgw nc sshgateway 22
82
83The following network plan illustrates the previous configuration in
84combination with layer 2 tunneling and Ethernet bridging.
85
86+--------+       (          )      +----------------------+
87| Client |------(  Internet  )-----| access.somewhere.net |
88+--------+       (          )      +----------------------+
89    : 192.168.1.78                             |
90    :.............................         +-------+
91     Forwarded ssh connection    :         | dmzgw |
92     Layer 2 tunnel              :         +-------+
93                                 :             |
94                                 :             |
95                                 :      +------------+
96                                 :......| sshgateway |
97                                      | +------------+
98--- real connection                 Bridge ->  |          +----------+
99... "virtual connection"                     [ X ]--------| somehost |
100[X] switch                                                +----------+
101                                                          192.168.1.25
102
103(5) Client: Connect to the server and establish the tunnel
104
105Finally connect to the OpenSSH server to establish the tunnel by using
106the following command:
107
108	ssh sshgateway
109
110It is also possible to tell the client to fork into the background after
111the connection has been successfully established:
112
113	ssh -f sshgateway true
114
115Without the ssh configuration done in step (4), it is also possible
116to use the following command lines:
117
118	ssh -fw 0:1 sshgateway true
119	ifconfig tun0 192.168.5.1 192.168.5.2 netmask 255.255.255.252
120
121Using OpenSSH tunnel forwarding is a simple way to establish secure
122and ad hoc virtual private networks. Possible fields of application
123could be wireless networks or administrative VPN tunnels.
124
125Nevertheless, ssh tunneling requires some packet header overhead and
126runs on top of TCP. It is still suggested to use the IP Security
127Protocol (IPSec) for robust and permanent VPN connections and to
128interconnect corporate networks.
129
130	Reyk Floeter
131
132$OpenBSD: README.tun,v 1.4 2006/03/28 00:12:31 deraadt Exp $
133