1 2 FreeBSD maintainer's guide to OpenSSH-portable 3 ============================================== 4 500) Make sure your mail spool has plenty of free space. It'll fill up 6 pretty fast once you're done with this checklist. 7 801) Download the latest OpenSSH-portable tarball and signature from 9 OpenBSD (ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/). 10 1102) Verify the signature: 12 13 $ gpg --verify openssh-X.YpZ.tar.gz.asc 14 1503) Unpack the tarball in a suitable directory: 16 17 $ tar xf openssh-X.YpZ.tar.gz 18 1904) Copy to the vendor directory: 20 21 $ svn co svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist 22 $ rsync --archive --delete openssh-X.YpZ/ dist/ 23 2405) Take care of added / deleted files: 25 26 $ svn rm $(svn stat dist | awk '$1 == "!" { print $2 }') 27 $ svn add --no-auto-props $(svn stat dist | awk '$1 == "?" { print $2 }') 28 2906) Commit: 30 31 $ svn commit -m "Vendor import of OpenSSH X.YpZ." dist 32 3307) Tag: 34 35 $ svn copy -m "Tag OpenSSH X.YpZ." \ 36 svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist \ 37 svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/X.YpZ 38 3908) Check out head and run the pre-merge script, which strips our RCS 40 tags from files that have them: 41 42 $ svn co svn+ssh://svn.freebsd.org/base/head 43 $ cd head/crypto/openssh 44 $ sh freebsd-pre-merge.sh 45 4609) Merge from the vendor branch: 47 48 $ svn merge -cNNNNNN \^/vendor-crypto/openssh/dist . 49 500A) Resolve conflicts. Remember to bump the version addendum in 51 version.h, and update the default value in ssh{,d}_config and 52 ssh{,d}_config.5. 53 540B) Diff against the vendor branch: 55 56 $ svn diff --no-diff-deleted --no-diff-added \ 57 --ignore-properties \^/vendor-crypto/openssh/X.YpZ . 58 59 Files that have modifications relative to the vendor code, and 60 only those files, must have the svn:keywords property set to 61 FreeBSD=%H and be listed in the 'keywords' file created by the 62 pre-merge script. 63 640C) Run the post-merge script, which re-adds RCS tags to files that 65 need them: 66 67 $ sh freebsd-post-merge.sh 68 690D) Run the configure script: 70 71 $ sh freebsd-configure.sh 72 730E) Review changes to config.h very carefully. 74 750F) If source files have been added or removed, update the appropriate 76 makefiles to reflect changes in the vendor's Makefile.in. 77 7810) Build libssh: 79 80 $ cd ../../secure/lib/libssh && make obj && make depend && make 81 8211) Follow the instructions in ssh_namespace.h to get a list of new 83 symbols, and them to ssh_namespace.h. Keep it sorted! 84 8512) Build and install world, reboot, test. Pay particular attention 86 to pam_ssh(8), which gropes inside libssh and will break if 87 something significant changes or if ssh_namespace.h is out of 88 whack. 89 9013) Commit, and hunker down for the inevitable storm of complaints. 91 92 93 94 An overview of FreeBSD changes to OpenSSH-portable 95 ================================================== 96 970) VersionAddendum 98 99 The SSH protocol allows for a human-readable version string of up 100 to 40 characters to be appended to the protocol version string. 101 FreeBSD takes advantage of this to include a date indicating the 102 "patch level", so people can easily determine whether their system 103 is vulnerable when an OpenSSH advisory goes out. Some people, 104 however, dislike advertising their patch level in the protocol 105 handshake, so we've added a VersionAddendum configuration variable 106 to allow them to change or disable it. Upstream added support for 107 VersionAddendum on the server side, but we also support it on the 108 client side. 109 1101) Modified server-side defaults 111 112 We've modified some configuration defaults in sshd: 113 114 - UsePAM defaults to "yes". 115 - PermitRootLogin defaults to "no". 116 - X11Forwarding defaults to "yes". 117 - PasswordAuthentication defaults to "no". 118 - VersionAddendum defaults to "FreeBSD-YYYYMMDD". 119 - PrivilegeSeparation defaults to "sandbox". 120 1212) Modified client-side defaults 122 123 We've modified some configuration defaults in ssh: 124 125 - CheckHostIP defaults to "no". 126 - VerifyHostKeyDNS defaults to "yes" if built with LDNS. 127 - VersionAddendum defaults to "FreeBSD-YYYYMMDD". 128 1293) Canonic host names 130 131 We've added code to ssh.c to canonicize the target host name after 132 reading options but before trying to connect. This eliminates the 133 usual problem with duplicate known_hosts entries. 134 1354) setusercontext() environment 136 137 Our setusercontext(3) can set environment variables, which we must 138 take care to transfer to the child's environment. 139 1405) TCP wrappers 141 142 Support for TCP wrappers was removed in upstream 6.7p1. We've 143 added it back by porting the 6.6p1 code forward. 144 1456) DSA keys 146 147 DSA keys were disabled by default in upstream 6.9p1. We've added 148 them back. 149 1507) Agent client reference counting 151 152 We've added code to ssh-agent.c to implement client reference 153 counting; the agent will automatically exit when the last client 154 disconnects. 155 1568) Class-based login restrictions 157 158 We've added code to auth2.c to enforce the host.allow, host.deny, 159 times.allow and times.deny login class capabilities. 160 1619) HPN 162 163 We no longer have the HPN patches (adaptive buffer size for 164 increased throughput on high-BxD links), but we recognize and 165 ignore HPN-related configuration options to avoid breaking existing 166 configurations. 167 168 169 170This port was brought to you by (in no particular order) DARPA, NAI 171Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co., 172Suzanne Vega, and a Sanford's #69 Deluxe Marker. 173 174 -- des@FreeBSD.org 175 176$FreeBSD$ 177