Name Date Size #Lines LOC




MakefileH A D19-Jun-20207.4 KiB266219

README.regressH A D30-Sep-20195.7 KiB162136

addrmatch.shH A D14-Mar-20202.1 KiB5746

agent-getpeereid.shH A D27-Nov-20191.1 KiB5846

agent-pkcs11.shH A D27-Nov-20193.2 KiB125103

agent-ptrace.shH A D27-Nov-20191.3 KiB6755

agent-subprocess.shH A D19-Jun-2020517 2313

agent-timeout.shH A D27-Nov-2019986 3932

agent.shH A DToday6.6 KiB228183

allow-deny-users.shH A D13-Jul-20181.4 KiB4632

authinfo.shH A D10-Apr-2018574 189

banner.shH A D01-May-20171.2 KiB4532

broken-pipe.shH A D01-May-2017281 138

brokenkeys.shH A D01-May-2017462 2412

cert-file.shH A D27-Nov-20195.3 KiB167120

cert-hostkey.shH A D04-Jan-202010.4 KiB326277

cert-userkey.shH A D04-Jan-202012.2 KiB405332

cfginclude.shH A D14-Dec-20164.4 KiB294202

cfgmatch.shH A D19-Jun-20194.8 KiB159124

cfgmatchlisten.shH A D13-Jul-20186.3 KiB203155

cfgparse.shH A D04-Jun-20182.2 KiB7652

check-perm.cH A D14-Dec-20164.3 KiB206163

cipher-speed.shH A D01-May-2017799 3324

conch-ciphers.shH A D05-Jul-2019799 2919

connect-privsep.shH A D01-May-20171 KiB3624

connect-uri.shH A D31-Oct-2017816 3020

connect.shH A D25-Jan-2020407 1912

dhgex.shH A D07-Oct-20191.5 KiB6249

dsa_ssh2.prvH A D14-Dec-2016863 1514

dsa_ssh2.pubH A D14-Dec-2016732 1413

dynamic-forward.shH A D26-Sep-20171.5 KiB6250

envpass.shH A D14-Dec-20161.5 KiB6148

exit-status.shH A D01-May-2017562 2316

forcecommand.shH A D01-May-20171.1 KiB3624

forward-control.shH A D07-Jun-20187.7 KiB236193

forwarding.shH A D20-Jul-20194.3 KiB137108

host-expand.shH A D01-May-2017384 179

hostkey-agent.shH A D21-Dec-20191.6 KiB5441

hostkey-rotate.shH A D27-Nov-20194.2 KiB12288

integrity.shH A D21-Jan-20202.3 KiB7759

kextype.shH A D14-Dec-2016587 2617

key-options.shH A D13-May-20203.4 KiB125104

keygen-change.shH A D21-Dec-2019522 2317

keygen-comment.shH A D22-Apr-20201.4 KiB5343

keygen-convert.shH A D23-Jul-20191.2 KiB4229

keygen-knownhosts.shH A D04-Jun-20186.4 KiB221146

keygen-moduli.shH A D03-Jan-2020900 2818

keys-command.shH A D25-Jul-20192.4 KiB8262

keyscan.shH A D22-Jan-2020492 2619

keytype.shH A D21-Dec-20192.4 KiB8473

krl.shH A D21-Dec-20197 KiB218172

limit-keytype.shH A D21-Dec-20194.7 KiB13498

localcommand.shH A D01-May-2017351 148

login-timeout.shH A D18-Sep-2017588 1913

mkdtemp.cH A D20-Aug-20181.5 KiB6237

modpipe.cH A D15-Feb-20183.8 KiB151123

moduli.inH A D14-Dec-20161.6 KiB43

multiplex.shH A D26-Jun-20207.4 KiB200163

multipubkey.shH A D16-Dec-20192.3 KiB6742

netcat.cH A D29-May-202040.3 KiB1,6841,314

percent.shH A D29-May-20202.7 KiB10077

portnum.shH A D14-Dec-2016624 3527

principals-command.shH A D21-Dec-20195.6 KiB175135

proto-mismatch.shH A D01-May-2017368 1812

proto-version.shH A D08-Jun-2017527 3124

proxy-connect.shH A D23-Jan-2020706 2821

putty-ciphers.shH A D23-Jan-2020691 2719

putty-kex.shH A D23-Jan-2020558 2315

putty-transfer.shH A D23-Jan-20201.1 KiB4536

reconfigure.shH A D01-May-2017855 4430

reexec.shH A D14-May-20201 KiB5835

rekey.shH A D10-Apr-20184.1 KiB173150

rsa_openssh.prvH A D14-Dec-2016883 1615

rsa_openssh.pubH A D14-Dec-2016213 21

rsa_ssh2.prvH A D14-Dec-2016924 1716

scp-ssh-wrapper.shH A D19-Jul-20191 KiB7263

scp-uri.shH A D05-Jan-20182 KiB7151

scp.shH A D19-Jul-20193.8 KiB137109

servcfginclude.shH A D28-May-20203.8 KiB189139

setuid-allowed.cH A D10-Jul-20181.5 KiB5932

sftp-badcmds.shH A D14-Mar-20202.2 KiB6650

sftp-batch.shH A D14-Dec-20161.2 KiB5638

sftp-chroot.shH A D22-Nov-2018863 3222

sftp-cmds.shH A D28-Mar-20197.2 KiB229170

sftp-glob.shH A D14-Dec-20162.5 KiB7663

sftp-perm.shH A D14-Dec-20165.2 KiB270217

sftp-uri.shH A D25-Mar-20181.6 KiB6448

sftp.shH A D31-Oct-2017737 3326

ssh-com-client.shH A D14-Dec-20163 KiB131102

ssh-com-keygen.shH A D14-Dec-20161.4 KiB7564

ssh-com-sftp.shH A D14-Dec-20161.2 KiB6654

ssh-com.shH A D08-May-20172.7 KiB12095

ssh2putty.shH A D25-Nov-2019692 3524

sshcfgparse.shH A D21-Dec-20194.4 KiB10990

sshd-log-wrapper.shH A D20-Oct-2017285 123

sshsig.shH A D14-Mar-20206.7 KiB197140

stderr-after-eof.shH A D01-May-2017603 2517

stderr-data.shH A D01-May-2017709 2822

t11.okH A D14-Dec-201651 21

t4.okH A D14-Dec-201652 21

t5.okH A D14-Dec-201666 21

test-exec.shH A D05-May-202016.1 KiB703563

transfer.shH A D01-May-2017583 2418

try-ciphers.shH A D01-May-2017715 2920

valgrind-unit.shH A D13-Jul-2018610 2314

yes-head.shH A D20-Oct-2017401 149


3$ ./configure && make tests
5You'll see some progress info. A failure will cause either the make to
6abort or the driver script to report a "FATAL" failure.
8The test consists of 2 parts. The first is the file-based tests which is
9driven by the Makefile, and the second is a set of network or proxycommand
10based tests, which are driven by a driver script ( which is
11called multiple times by the Makefile.
13Failures in the first part will cause the Makefile to return an error.
14Failures in the second part will print a "FATAL" message for the failed
15test and continue.
17OpenBSD has a system-wide regression test suite. OpenSSH Portable's test
18suite is based on OpenBSD's with modifications.
21Environment variables.
23SKIP_UNIT: Skip unit tests.
24SUDO: path to sudo/doas command, if desired. Note that some systems
25	(notably systems using PAM) require sudo to execute some tests.
26LTESTS: Whitespace separated list of tests (filenames without the .sh
27	extension) to run.
28SKIP_LTESTS: Whitespace separated list of tests to skip.
29OBJ: used by test scripts to access build dir.
30TEST_SHELL: shell used for running the test scripts.
31TEST_SSH_FAIL_FATAL: set to "yes" to make any failure abort the test
32	currently in progress.
33TEST_SSH_PORT: TCP port to be used for the listening tests.
34TEST_SSH_QUIET: set to "yes" to suppress non-fatal output.
35TEST_SSH_SSHD_CONFOPTS: Configuration directives to be added to sshd_config
36	before running each test.
37TEST_SSH_SSH_CONFOPTS: Configuration directives to be added to
38	ssh_config before running each test.
39TEST_SSH_TRACE: set to "yes" for verbose output from tests
40TEST_SSH_x: path to "ssh" command under test, where x is one of
43USE_VALGRIND: Run the tests under valgrind memory checker.
46Individual tests.
48You can run an individual test from the top-level Makefile, eg:
49$ make tests LTESTS=agent-timeout
51If you need to manipulate the environment more you can invoke
52directly if you set up the path to find the binaries under test and the
53test scripts themselves, for example:
55$ cd regress
56$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh sh `pwd` \
58ok agent timeout test
62 the main test driver. Sets environment, creates config files
64and keys and runs the specified test.
66At the time of writing, the individual tests are:		simple connect	proxy connect	proxy connect with privsep		uri connect	sshd version with different protocol combinations	protocol version mismatch		remote exit status		environment passing		transfer data		banner		rekey		stderr data transfer	stderr data after eof		broken pipe test		try ciphers		yes pipe head	connect after login grace timeout		simple connect via agent	disallow agent attach from other uid	agent timeout test	disallow agent ptrace attach		keyscan	change passphrase for key	convert keys	keygen moduli		key options			scp		scp-uri		basic sftp put/get		sftp in chroot		sftp command	sftp invalid commands		sftp batchfile		sftp glob		sftp permissions		sftp-uri	connect with client key import	basic sftp put/get with server		connect to server		simple connect after reconfigure	dynamic forwarding		local and remote forwarding		connection multiplexing		reexec tests		broken keys		ssh config parse		sshd config parse		sshd_config match	sshd_config matchlisten		address match	localcommand	forced command		port number parsing		login with different key types		login with different key exchange algorithms		certified host keys	certified user keys		expand %h and %n	authorized keys from command	sshd control of local and remote forwarding		integrity			key revocation lists		multiple pubkey	restrict pubkey type	hostkey agent	ssh-keygen known_hosts	hostkey rotate	authorized principals command		ssh with certificates		config include	AllowUsers/DenyUsers		authinfo
144Run the failing test with shell tracing (-x) turned on:
145$ PATH=`pwd`/..:$PATH:. sh -x `pwd`
147Failed tests can be difficult to diagnose. Suggestions:
148- run the individual test via ./ `pwd` [testname]
149- set LogLevel to VERBOSE in and enable syslogging of
150  auth.debug (eg to /var/log/authlog).
153Known Issues.
155- Similarly, if you do not have "scp" in your system's $PATH then the
156  multiplex scp tests will fail (since the system's shell startup scripts
157  will determine where the shell started by sshd will look for scp).
159- Recent GNU coreutils deprecate "head -[n]": this will cause the yes-head
160  test to fail.  The old behaviour can be restored by setting (and
161  exporting) _POSIX2_VERSION=199209 before running the tests.