1 FreeBSD maintainer's guide to OpenSSH-portable 2 ============================================== 3 400) Make sure your mail spool has plenty of free space. It'll fill up 5 pretty fast once you're done with this checklist. 6 701) Download the latest OpenSSH-portable tarball and signature from 8 OpenBSD (https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/). 9 1002) Verify the signature: 11 12 $ gpg --verify openssh-X.YpZ.tar.gz.asc 13 1403) Unpack the tarball in a suitable directory: 15 16 $ tar xf openssh-X.YpZ.tar.gz 17 1804) Copy to the vendor directory: 19 20 $ svn co svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/dist 21 $ rsync --archive --delete openssh-X.YpZ/ dist/ 22 2305) Take care of added / deleted files: 24 25 $ svn rm $(svn stat dist | awk '$1 == "!" { print $2 }') 26 $ svn add --no-auto-props $(svn stat dist | awk '$1 == "?" { print $2 }') 27 2806) Commit: 29 30 $ svn commit -m "Vendor import of OpenSSH X.YpZ." dist 31 3207) Tag: 33 34 $ svn copy -m "Tag OpenSSH X.YpZ." \ 35 svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/dist \ 36 svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/X.YpZ 37 3808) Check out head and run the pre-merge script, which strips our RCS 39 tags from files that have them: 40 41 $ svn co svn+ssh://repo.freebsd.org/base/head 42 $ cd head/crypto/openssh 43 $ sh freebsd-pre-merge.sh 44 4509) Merge from the vendor branch: 46 47 $ svn merge -cNNNNNN \^/vendor-crypto/openssh/dist . 48 49 A number of files have been deleted from FreeBSD's copy of ssh, 50 including rendered man pages (which have a .0 extension). When 51 svn prompts for these deleted files during the merge, choose 'r' 52 (leaving them deleted). 53 540A) Resolve conflicts. Remember to bump the version addendum in 55 version.h, and update the default value in ssh{,d}_config and 56 ssh{,d}_config.5. 57 580B) Diff against the vendor branch: 59 60 $ svn diff --no-diff-deleted --no-diff-added \ 61 --ignore-properties \^/vendor-crypto/openssh/X.YpZ . 62 63 Files that have modifications relative to the vendor code, and 64 only those files, must have the svn:keywords property set to 65 FreeBSD=%H and be listed in the 'keywords' file created by the 66 pre-merge script. 67 680C) Run the post-merge script, which re-adds RCS tags to files that 69 need them: 70 71 $ sh freebsd-post-merge.sh 72 730D) Run the configure script: 74 75 $ sh freebsd-configure.sh 76 770E) Review changes to config.h very carefully. 78 79 Note that libwrap should not be defined in config.h; as of 80 r311585 it is conditional on MK_TCP_WRAPPERS. 81 820F) If source files have been added or removed, update the appropriate 83 makefiles to reflect changes in the vendor's Makefile.in. 84 8510) Update ssh_namespace.h: 86 87 $ sh freebsd-namespace.sh 88 8911) Build and install world, reboot, test. Pay particular attention 90 to pam_ssh(8), which gropes inside libssh and will break if 91 something significant changes or if ssh_namespace.h is out of 92 whack. 93 9412) Commit, and hunker down for the inevitable storm of complaints. 95 96 97 98 An overview of FreeBSD changes to OpenSSH-portable 99 ================================================== 100 1010) VersionAddendum 102 103 The SSH protocol allows for a human-readable version string of up 104 to 40 characters to be appended to the protocol version string. 105 FreeBSD takes advantage of this to include a date indicating the 106 "patch level", so people can easily determine whether their system 107 is vulnerable when an OpenSSH advisory goes out. Some people, 108 however, dislike advertising their patch level in the protocol 109 handshake, so we've added a VersionAddendum configuration variable 110 to allow them to change or disable it. Upstream added support for 111 VersionAddendum on the server side, but we also support it on the 112 client side. 113 1141) Modified server-side defaults 115 116 We've modified some configuration defaults in sshd: 117 118 - UsePAM defaults to "yes". 119 - PermitRootLogin defaults to "no". 120 - X11Forwarding defaults to "yes". 121 - PasswordAuthentication defaults to "no". 122 - VersionAddendum defaults to "FreeBSD-YYYYMMDD". 123 - PrivilegeSeparation defaults to "sandbox". 124 - UseDNS defaults to "yes". 125 1262) Modified client-side defaults 127 128 We've modified some configuration defaults in ssh: 129 130 - CheckHostIP defaults to "no". 131 - VerifyHostKeyDNS defaults to "yes" if built with LDNS. 132 - VersionAddendum defaults to "FreeBSD-YYYYMMDD". 133 1343) Canonic host names 135 136 We've added code to ssh.c to canonicize the target host name after 137 reading options but before trying to connect. This eliminates the 138 usual problem with duplicate known_hosts entries. 139 1404) setusercontext() environment 141 142 Our setusercontext(3) can set environment variables, which we must 143 take care to transfer to the child's environment. 144 1455) TCP wrappers 146 147 Support for TCP wrappers was removed in upstream 6.7p1. We've 148 added it back by porting the 6.6p1 code forward. 149 150 TCP wrappers support in sshd will be disabled in HEAD and will 151 be removed from FreeBSD in the future. 152 1536) Agent client reference counting 154 155 We've added code to ssh-agent.c to implement client reference 156 counting; the agent will automatically exit when the last client 157 disconnects. 158 1597) Class-based login restrictions 160 161 We've added code to auth2.c to enforce the host.allow, host.deny, 162 times.allow and times.deny login class capabilities. 163 1648) HPN 165 166 We no longer have the HPN patches (adaptive buffer size for 167 increased throughput on high-BxD links), but we recognize and 168 ignore HPN-related configuration options to avoid breaking existing 169 configurations. 170 1719) AES-CBC 172 173 The AES-CBC ciphers were removed from the server-side proposal list 174 in 6.7p1 due to theoretical weaknesses and the availability of 175 superior ciphers (including AES-CTR and AES-GCM). We have re-added 176 them for compatibility with third-party clients. 177 178 179 180This port was brought to you by (in no particular order) DARPA, NAI 181Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co., 182Suzanne Vega, and a Sanford's #69 Deluxe Marker. 183 184 -- des@FreeBSD.org 185 186$FreeBSD$ 187