Name Date Size #Lines LOC

..08-May-2022-

contrib/H08-May-2022-577448

CREDITSH A D08-May-20225.4 KiB10398

LICENCEH A D29-Nov-202218.1 KiB372328

PROTOCOLH A D29-Nov-202224.7 KiB716524

PROTOCOL.agentH A D29-Nov-20223 KiB8563

PROTOCOL.certkeysH A D08-May-202212.8 KiB322258

PROTOCOL.chacha20poly1305H A D08-May-20224.5 KiB10884

PROTOCOL.keyH A D29-Nov-20221.6 KiB7253

PROTOCOL.krlH A D08-May-20225.1 KiB172118

PROTOCOL.muxH A D29-Nov-20228.9 KiB299219

PROTOCOL.sshsigH A D08-May-20223.3 KiB10174

READMEH A D29-Nov-20222.1 KiB5337

README.DELETEDH A D29-Nov-20221.6 KiB116115

README.DRAGONFLYH A D29-Nov-20221.2 KiB4638

README.dnsH A D08-May-20221.6 KiB4830

README.tunH A D08-May-20224.8 KiB13398

addr.cH A D29-Nov-20228.8 KiB436324

addr.hH A D08-May-20222.2 KiB6139

addrmatch.cH A D08-May-20224.4 KiB170109

atomicio.cH A D29-Nov-20224.7 KiB180129

atomicio.hH A D08-May-20222.2 KiB5414

audit.hH A D08-May-20222.3 KiB5828

auth-options.cH A D29-Nov-202223.4 KiB910746

auth-options.hH A D08-May-20223.1 KiB10740

auth-pam.cH A D08-May-202236.4 KiB1,3981,084

auth-pam.hH A D08-May-20221.9 KiB4820

auth-passwd.cH A D08-May-20226.4 KiB224147

auth-rhosts.cH A D29-Nov-20229.1 KiB337223

auth.cH A D29-Nov-202223.7 KiB859660

auth.hH A D29-Nov-20228.2 KiB248156

auth2-chall.cH A D08-May-20229.5 KiB383305

auth2-hostbased.cH A D29-Nov-20228 KiB267210

auth2-kbdint.cH A D29-Nov-20222.2 KiB7336

auth2-none.cH A D29-Nov-20222.3 KiB8044

auth2-passwd.cH A D29-Nov-20222.4 KiB8146

auth2-pubkey.cH A D29-Nov-202223.5 KiB816663

auth2-pubkeyfile.cH A D29-Nov-202213.8 KiB502362

auth2.cH A D29-Nov-202222.7 KiB848656

authfd.cH A D29-Nov-202218.9 KiB756570

authfd.hH A D29-Nov-20224 KiB12278

authfile.cH A D29-Nov-202212.4 KiB527394

authfile.hH A D08-May-20222.4 KiB5522

bitmap.cH A D08-May-20224.4 KiB215171

bitmap.hH A D08-May-20221.9 KiB5815

canohost.cH A D08-May-20224.7 KiB205143

canohost.hH A D08-May-2022842 279

chacha.cH A D08-May-20225.3 KiB220188

chacha.hH A D08-May-2022994 3722

channels.cH A D29-Nov-2022140.3 KiB5,1444,091

channels.hH A D29-Nov-202214.4 KiB384249

cipher-aesctr.hH A D08-May-20221.3 KiB3613

cipher-chachapoly-libcrypto.cH A D08-May-20224.9 KiB167113

cipher-chachapoly.hH A D08-May-20221.6 KiB4117

cipher.cH A D29-Nov-202213.4 KiB527420

cipher.hH A D08-May-20223.2 KiB7935

cleanup.cH A D08-May-20221 KiB3310

clientloop.cH A D29-Nov-202275.1 KiB2,6261,950

clientloop.hH A D08-May-20223.7 KiB8532

compat.cH A D29-Nov-20226.5 KiB216175

compat.hH A D08-May-20222.7 KiB6828

crypto_api.hH A D08-May-20221.8 KiB5939

defines.hH A D29-Nov-202223.7 KiB946709

dh.cH A D08-May-202215.4 KiB506403

dh.hH A D08-May-20222.7 KiB8536

digest-openssl.cH A D08-May-20224.9 KiB208160

digest.hH A D08-May-20222.5 KiB7132

dispatch.cH A D08-May-20223.5 KiB13696

dispatch.hH A D08-May-20222 KiB5017

dns.cH A D29-Nov-20228.8 KiB341242

dns.hH A D08-May-20222.1 KiB6026

ed25519.cH A D08-May-20223.1 KiB145105

entropy.cH A D08-May-20223.8 KiB14485

entropy.hH A D08-May-20221.5 KiB357

fatal.cH A D08-May-20221.8 KiB4714

fe25519.cH A D08-May-20228.1 KiB338278

fe25519.hH A D08-May-20222.3 KiB7142

ge25519.cH A D08-May-202211 KiB322249

ge25519.hH A D08-May-20221.4 KiB4425

ge25519_base.dataH A D08-May-2022164.6 KiB859856

groupaccess.cH A D08-May-20223.5 KiB13579

groupaccess.hH A D08-May-20221.5 KiB367

hash.cH A D08-May-2022781 4428

hmac.cH A D08-May-20225.1 KiB199150

hmac.hH A D08-May-20221.6 KiB3915

hostfile.cH A D29-Nov-202224.4 KiB938726

hostfile.hH A D08-May-20224.4 KiB12475

includes.hH A D29-Nov-20223.8 KiB179135

kex.cH A D29-Nov-202236.4 KiB1,4221,195

kex.hH A D29-Nov-20228.6 KiB267209

kexc25519.cH A D08-May-20225.7 KiB200149

kexdh.cH A D08-May-20225 KiB204161

kexecdh.cH A D08-May-20226.1 KiB240188

kexgen.cH A D29-Nov-202210.4 KiB372304

kexgex.cH A D08-May-20223.7 KiB10570

kexgexc.cH A D29-Nov-20227 KiB242186

kexgexs.cH A D29-Nov-20226.4 KiB218159

kexsntrup761x25519.cH A D29-Nov-20227.6 KiB252199

krl.cH A D29-Nov-202237.4 KiB1,4481,201

krl.hH A D08-May-20222.7 KiB6838

log.cH A D08-May-202211.8 KiB501398

log.hH A D08-May-20227 KiB133103

loginrec.cH A D29-Nov-202242.1 KiB1,7311,106

loginrec.hH A D08-May-20224.6 KiB13553

mac.cH A D08-May-20227.2 KiB263209

mac.hH A D08-May-20222 KiB5424

match.cH A D08-May-20229.6 KiB365204

match.hH A D08-May-20221.2 KiB3114

misc.cH A D29-Nov-202260.7 KiB2,8292,215

misc.hH A D29-Nov-20228.2 KiB235177

moduliH A D29-Nov-2022525.8 KiB421420

moduli.5H A D29-Nov-20223.6 KiB127126

moduli.cH A D29-Nov-202220.6 KiB814498

monitor.cH A D29-Nov-202251.9 KiB1,9561,558

monitor.hH A D08-May-20223.9 KiB9656

monitor_fdpass.cH A D08-May-20224.6 KiB186144

monitor_fdpass.hH A D08-May-20221.5 KiB355

monitor_wrap.cH A D29-Nov-202225.9 KiB1,022806

monitor_wrap.hH A D29-Nov-20223.8 KiB10361

msg.cH A D08-May-20222.7 KiB9560

msg.hH A D08-May-20221.5 KiB336

mux.cH A D29-Nov-202261.9 KiB2,3451,954

myproposal.hH A D29-Nov-20223.7 KiB11779

nchan.cH A D29-Nov-202211.8 KiB444343

packet.cH A D29-Nov-202270.7 KiB2,7202,093

packet.hH A D29-Nov-20227.5 KiB224159

pathnames.hH A D08-May-20226 KiB18074

pkcs11.hH A D08-May-202241.4 KiB1,3581,119

platform-misc.cH A D08-May-20221.1 KiB3613

platform.cH A D29-Nov-20225.8 KiB251173

platform.hH A D29-Nov-20221.7 KiB5028

poly1305.cH A D08-May-20224.5 KiB161121

poly1305.hH A D08-May-2022645 2311

progressmeter.cH A D08-May-20227.3 KiB297213

progressmeter.hH A D08-May-20221.5 KiB293

readconf.cH A D29-Nov-202297.1 KiB3,4712,913

readconf.hH A D29-Nov-20228.6 KiB247182

readpass.cH A D29-Nov-20228.3 KiB333256

rijndael.hH A D29-Nov-20222 KiB5620

sandbox-rlimit.cH A D08-May-20222.4 KiB9759

sc25519.cH A D08-May-20227.2 KiB309255

sc25519.hH A D08-May-20222.8 KiB8146

scp.1H A D29-Nov-20227.4 KiB313312

scp.cH A D29-Nov-202250.8 KiB2,1741,771

servconf.cH A D29-Nov-202290.7 KiB3,0612,633

servconf.hH A D29-Nov-202211.3 KiB315220

serverloop.cH A D29-Nov-202228.3 KiB936714

serverloop.hH A D08-May-20221,000 295

session.cH A D29-Nov-202266.8 KiB2,7152,013

session.hH A D08-May-20222.6 KiB8548

sftp-client.cH A D29-Nov-202277.1 KiB2,9392,378

sftp-client.hH A D29-Nov-20226.5 KiB21285

sftp-common.cH A D29-Nov-20226.9 KiB264210

sftp-common.hH A D29-Nov-20222.1 KiB5420

sftp-glob.cH A D29-Nov-20223.4 KiB15195

sftp-realpath.cH A D08-May-20226 KiB226147

sftp-server-main.cH A D29-Nov-20221.4 KiB5327

sftp-server.8H A D08-May-20225 KiB171170

sftp-server.cH A D29-Nov-202251.9 KiB2,1091,793

sftp-usergroup.cH A D29-Nov-20225.4 KiB240187

sftp-usergroup.hH A D29-Nov-20221.1 KiB264

sftp.1H A D29-Nov-202216.4 KiB715714

sftp.cH A D29-Nov-202262.5 KiB2,6572,186

sftp.hH A D08-May-20223.3 KiB10255

sk-api.hH A D29-Nov-20222.9 KiB10465

smult_curve25519_ref.cH A D08-May-20226.7 KiB266227

sntrup761.cH A D08-May-202225.4 KiB1,274886

srclimit.cH A D08-May-20223.8 KiB141100

srclimit.hH A D08-May-2022895 193

ssh-add.1H A D29-Nov-202210.2 KiB343342

ssh-add.cH A D29-Nov-202225.8 KiB1,015863

ssh-agent.1H A D29-Nov-20227.1 KiB234233

ssh-agent.cH A D29-Nov-202258.7 KiB2,2741,896

ssh-dss.cH A D08-May-20225.5 KiB208156

ssh-ecdsa-sk.cH A D08-May-202210.2 KiB325240

ssh-ecdsa.cH A D08-May-20225.5 KiB201149

ssh-ed25519-sk.cH A D08-May-20224.6 KiB164133

ssh-ed25519.cH A D29-Nov-20224.1 KiB161127

ssh-keygen.1H A D29-Nov-202240.7 KiB1,3351,334

ssh-keygen.cH A D29-Nov-2022105.9 KiB3,9333,434

ssh-keyscan.1H A D29-Nov-20223.9 KiB163162

ssh-keyscan.cH A D29-Nov-202218.9 KiB837702

ssh-keysign.8H A D29-Nov-20222.9 KiB9493

ssh-keysign.cH A D29-Nov-20228.1 KiB307229

ssh-pkcs11-helper.8H A D29-Nov-20221.7 KiB7271

ssh-pkcs11-helper.cH A D29-Nov-202210.5 KiB447362

ssh-pkcs11.hH A D08-May-20221.6 KiB4120

ssh-rsa.cH A D08-May-202211.9 KiB450359

ssh-sandbox.hH A D08-May-20221.1 KiB256

ssh-sk-client.cH A D29-Nov-202211.2 KiB481409

ssh-sk.hH A D29-Nov-20222.7 KiB8027

ssh.1H A D29-Nov-202246 KiB1,7831,782

ssh.cH A D29-Nov-202269.4 KiB2,3771,861

ssh.hH A D08-May-20222.8 KiB10522

ssh2.hH A D08-May-20225.6 KiB17578

ssh_api.cH A D08-May-202214.5 KiB571452

ssh_api.hH A D08-May-20224.3 KiB13831

ssh_configH A D08-May-20221.5 KiB4742

ssh_config.5H A D29-Nov-202261.6 KiB2,1942,193

sshbuf-getput-basic.cH A D29-Nov-202212.2 KiB634527

sshbuf-getput-crypto.cH A D29-Nov-20224.4 KiB181141

sshbuf-io.cH A D08-May-20222.7 KiB11886

sshbuf-misc.cH A D29-Nov-20227 KiB309260

sshbuf.cH A D29-Nov-20229 KiB405316

sshbuf.hH A D29-Nov-202214.3 KiB416189

sshconnect.cH A D29-Nov-202248.3 KiB1,7091,330

sshconnect.hH A D08-May-20223.1 KiB9555

sshconnect2.cH A D29-Nov-202266 KiB2,3971,922

sshd.8H A D29-Nov-202231.5 KiB1,0291,028

sshd.cH A D29-Nov-202266.3 KiB2,4631,781

sshd_configH A D08-May-20223 KiB11793

sshd_config.5H A D29-Nov-202254.8 KiB1,9851,984

ssherr.cH A D08-May-20225.2 KiB152133

ssherr.hH A D08-May-20223.4 KiB9065

sshkey-xmss.hH A D08-May-20222.9 KiB5728

sshkey.cH A D29-Nov-2022121.8 KiB4,8574,226

sshkey.hH A D29-Nov-202212.3 KiB340257

sshlogin.cH A D29-Nov-20225.3 KiB175100

sshlogin.hH A D08-May-2022935 248

sshpty.cH A D08-May-20225.7 KiB233165

sshpty.hH A D08-May-20221 KiB2910

sshsig.cH A D29-Nov-202229.1 KiB1,149991

sshsig.hH A D29-Nov-20224 KiB11236

sshtty.cH A D08-May-20222.9 KiB9752

ttymodes.cH A D08-May-20229.7 KiB451328

ttymodes.hH A D08-May-20224.9 KiB170104

uidswap.cH A D08-May-20227.3 KiB239158

uidswap.hH A D08-May-2022680 183

umac.cH A D29-Nov-202244.9 KiB1,283769

umac.hH A D29-Nov-20224.6 KiB13042

umac128.cH A D08-May-2022274 117

utf8.cH A D08-May-20228.2 KiB356240

utf8.hH A D08-May-20221.3 KiB2911

verify.cH A D08-May-2022668 5040

version.hH A D29-Nov-2022170 73

xmalloc.cH A D29-Nov-20222.5 KiB11986

xmalloc.hH A D08-May-20221.1 KiB289

xmss_fast.hH A D08-May-20223.6 KiB11250

README

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

README.DELETED

1.depend
2.github/
3.gitignore
4.git_allowed_signers
5.git_allowed_signers.asc
6.skipped-commit-ids
7ChangeLog
8INSTALL
9Makefile.in
10OVERVIEW
11PROTOCOL.u2f
12README.md
13SECURITY.md
14README.platform
15README.privsep
16TODO
17aclocal.m4
18audit-bsm.c
19audit-linux.c
20audit.c
21auth-bsdauth.c
22auth-krb5.c
23auth-shadow.c
24auth-sia.c
25auth-sia.h
26auth2-gss.c
27buildpkg.sh.in
28cipher-aes.c
29cipher-aesctr.c
30cipher-chachapoly.c
31cipher-ctr.c
32config.guess
33config.h.in
34config.sub
35configure
36configure.ac
37contrib/Makefile
38contrib/README
39contrib/aix/
40contrib/cygwin/
41contrib/findssl.sh
42contrib/gnome-ssh-askpass1.c
43contrib/gnome-ssh-askpass2.c
44contrib/gnome-ssh-askpass3.c
45contrib/hpux/
46contrib/redhat/
47contrib/solaris/
48contrib/sshd.pam.freebsd
49contrib/sshd.pam.generic
50contrib/suse/
51digest-libc.c
52fixalgorithms
53fixpaths
54gss-genr.c
55gss-serv-krb5.c
56gss-serv.c
57install-sh
58int32_minmax.inc
59logintest.c
60m4/
61md5crypt.c
62md5crypt.h
63mdoc2man.awk
64mkinstalldirs
65moduli.0
66nchan.ms
67nchan2.ms
68openbsd-compat/
69openssh.xml.in
70opensshd.init.in
71platform-pledge.c
72platform-tracing.c
73regress/
74rijndael.c
75sandbox-capsicum.c
76sandbox-darwin.c
77sandbox-null.c
78sandbox-pledge.c
79sandbox-seccomp-filter.c
80sandbox-solaris.c
81sandbox-systrace.c
82scp.0
83sftp-server.0
84sftp.0
85sk-usbhid.c
86sntrup761.sh
87ssh-add.0
88ssh-agent.0
89ssh-gss.h
90ssh-keygen.0
91ssh-keyscan.0
92ssh-keysign.0
93ssh-pkcs11-client.c
94ssh-pkcs11-helper.0
95ssh-pkcs11.c
96ssh-sk-helper.0
97ssh-sk-helper.8
98ssh-sk-helper.c
99ssh-sk.c
100ssh-xmss.c
101ssh.0
102ssh_config.0
103sshd.0
104sshd_config.0
105sshkey-xmss.c
106survey.sh.in
107xmss_commons.c
108xmss_commons.h
109xmss_fast.c
110xmss_hash.c
111xmss_hash.h
112xmss_hash_address.c
113xmss_hash_address.h
114xmss_wots.c
115xmss_wots.h
116

README.DRAGONFLY

1OPENSSH
2=======
3
4Original source can be downloaded from OpenBSD at
5ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
6
7file = openssh-9.1p1.tar.gz
8date = 04 October 2022
9size = 1838747
10sha1 = 15545440268967511d3194ebf20bcd0c7ff3fcc9
11
12A list of deleted files is in README.DELETED.
13
14Configured with
15===============
16./configure --prefix=/usr --sysconfdir=/etc/ssh --with-sandbox=rlimit --with-pam \
17	    --with-libedit --without-ssl-engine --without-rpath \
18	    --with-privsep-path=/var/empty --with-xauth=/usr/local/bin/xauth \
19	    --disable-pkcs11 ac_cv_lib_dl_dlopen=no
20
21The following files have been patched (* planned)
22=================================================
23  auth-pam.c			WARNS, static sshpam_password_change_required()
24  platform.h			pledge dummies
25  session.c			WARNS, unused copy_environment()
26				WARNS, strdup(login_getcapstr()) (leak)
27  servconf.c			PAM defaults
28  sshd_config			PasswordAuthentication no
29
30NOTE: The configure script misdetects few things.
31Update config.h and openbsd-compat in lib/libssh.
32
33Used in:
34lib/libssh/
35libexec/sftp-server/
36libexec/ssh-keysign/
37libexec/ssh-pkcs11-helper/
38usr.bin/scp/
39usr.bin/sftp/
40usr.bin/ssh-add/
41usr.bin/ssh-agent/
42usr.bin/ssh-keygen/
43usr.bin/ssh-keyscan/
44usr.bin/ssh/
45usr.sbin/sshd/
46

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.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