SSH Mastery was published in 2018, and it’s still the SSH book to buy. People pass on it because of that date, but the parts of SSH that trip you up (keys, the agent, forwarding, jump hosts and certificates) still work the way Michael W. Lucas describes them. What moved since then are the defaults: which key exchange runs, which signatures a server accepts and which protocol scp really speaks.
So is a 2018 book still worth reading? Yes, as long as you know which pages aged. Below are the four SSH books worth your money and who each one fits, plus a map of the OpenSSH changes since the second edition went to press that bite readers of it. Editions and prices came from Amazon’s catalog and the changes from the OpenSSH and PuTTY release notes. The post-quantum behaviour comes from Ubuntu 26.04 and Rocky Linux 9.8 lab hosts we ran in October 2026.
Two SSH books, two for the server around them
Two of these are SSH books from cover to cover, and only SSH Mastery is both current and practical. The other two cover what sits around sshd: the hardened server it runs on and the PAM stack it hands logins to:
| Award | Book | Why it wins | Price band |
|---|---|---|---|
| Best SSH book overall | SSH Mastery, 2nd Edition | Keys, agents, forwarding, VPNs and certificate authorities in 241 pages | About $21 |
| Best protocol reference | SSH, The Secure Shell: The Definitive Guide | 666 pages on how SSH-2 works, for when you need the reason behind a setting | About $30, low stock |
| Best for server hardening | Mastering Linux Security and Hardening, 3rd Edition | An SSH hardening chapter inside a full Linux security book | About $27 |
| Best for SSH with 2FA | PAM Mastery | The login stack behind sshd, including one-time password codes | About $12 |
If you buy only one, buy SSH Mastery and keep the OpenSSH release notes in a browser tab. The table near the end of this page tells you which chapters those notes touch.
Most SSH books on Amazon are filler
Search Amazon for SSH books and you’ll get dozens of titles, many of them recent self-published titles, priced from under a dollar to about $31, with page counts from about 120 to almost 970. A long page count does not mean depth, and a new date doesn’t mean current. We pulled the whole catalog through Amazon’s API and kept a book only when it passed four checks.
- A named publisher, or an author with a record on the subject
- A print edition you can still buy new
- Real depth on SSH, not a shell book with ssh in the title
- A job none of the other picks already does
Those checks cut Pro OpenSSH (Apress, 2005) and OpenSSH: A Survival Guide (SANS Press, 2003), which both predate OpenSSH certificates and Ed25519 keys. They also cut the recent self-published titles such as Modern OpenSSH In-Depth, because we could not confirm who reviewed them. A $31 book with no track record is a worse bet than a $21 one from an author whose first SSH book came out in 2012.
Compare the four books
Read the last column first. Every book here is older than the OpenSSH you run, so the question is which gaps matter for your work:
| Book | Author | Edition | Pages | Covers | Where its age shows |
|---|---|---|---|---|---|
| SSH Mastery | Michael W. Lucas | 2nd, 2018 | 241 | OpenSSH server and client, PuTTY, keys, forwarding, VPNs, certificates | No hardware security keys, older key exchange defaults |
| SSH, The Secure Shell: The Definitive Guide | Barrett, Silverman, Byrnes | 2nd, 2005 | 666 | The SSH-2 protocol across several implementations | No Ed25519, no certificates, retired ciphers |
| Mastering Linux Security and Hardening | Donald A. Tevault | 3rd, 2023 | 618 | Linux hardening on Ubuntu and AlmaLinux, one SSH chapter | Written before ML-KEM became the default and DSA was removed |
| PAM Mastery | Michael W. Lucas | 1st, 2016 | 181 | Linux-PAM and OpenPAM, debugging, one-time passwords | Policy examples from the CentOS and Debian of 2016 |
1. SSH Mastery, 2nd Edition by Michael W. Lucas
Buy this one if you open a shell on a remote box every day and were never quite sure why agent forwarding is risky or when a jump host beats a tunnel. Lucas writes for working sysadmins and organises the book around jobs: checking a host key, copying files, forwarding a port, handing out keys.

Its chapters follow the order you would meet the problems on a real network:
- Encryption algorithms, keys and the common client and server settings
- Verifying server keys, so the first-connection prompt means something
- Copying files, user keys and the agent
- X forwarding and port forwarding, SOCKS proxies included
- Keeping connections open, distributing keys and automation
- SSH-based VPNs and certificate authorities
The second edition added SSH certificates, which is the chapter that changes how you run SSH past a handful of hosts: you sign each user key once instead of copying authorized_keys files to every server. Lucas finished the draft in late 2017, just after OpenSSH deleted the last of the old SSH-1 protocol, so everything in it is the SSH-2 world you run today. Pair the client chapters with our notes on managing connections in the SSH config file and the walkthrough on creating SSH tunnels from the command line.
Its gaps are features that shipped later. Hardware security keys arrived in 2020, and PuTTY only learned to use OpenSSH certificates in 2022, so any Windows advice in the certificate chapter predates PuTTY’s own support. The table under the picks maps each change to the chapter it touches.
Best for: anyone who uses SSH daily and wants the whole tool explained once, properly. Pass on it if you need a protocol-level reference for writing or auditing an SSH implementation. It runs about $21 against a $29.99 list price, so check the current price before you order.
2. SSH, The Secure Shell: The Definitive Guide by Barrett, Silverman and Byrnes
Read this one when SSH Mastery tells you what to set and you want to know why the protocol works that way. O’Reilly’s second edition runs 666 pages on SSH-2, covers several implementations side by side and closes with case studies of larger networks.

It was printed in 2005, and that shows in specific places. Ed25519 keys reached OpenSSH in 2014 and certificates in 2010, so neither is in it, and ciphers that were normal in 2005, such as arcfour and blowfish, were deleted from OpenSSH in 2017. The protocol model has not changed, though, and that’s what you would use it for.
- Understanding why a setting exists before you change it
- Comparing how different SSH implementations behave
- Background reading before you audit a product that embeds SSH
Best for: engineers who debug SSH at the protocol level, or audit products that embed it. Pass on it if you want configuration you can paste today, because its examples need translating to current OpenSSH. Amazon showed it at about $30 with limited stock when we checked, so check the current price and stock.
3. Mastering Linux Security and Hardening by Donald A. Tevault
An SSH server is only as safe as the box it runs on, and this book covers the box. Tevault’s third edition is written against Ubuntu and AlmaLinux and gives SSH hardening its own chapter, between the encryption chapter and the access control ones.
You would buy it for the chapters around the SSH one, not instead of a second SSH book. A hardened sshd behind an open firewall, with SELinux turned off, is half a job, and the book handles those layers in order:
- Firewalls, across two chapters
- SELinux and AppArmor
- Kernel hardening and process isolation
- OpenSCAP scans, auditd and log security
It went to press in February 2023, before OpenSSH made ML-KEM its default key exchange and removed DSA, so take the cipher and key exchange lists from our post-quantum SSH hardening guide for Ubuntu 26.04 instead.
Best for: admins who own the whole server, not only the SSH daemon. Pass on it if SSH is the only thing you want to learn, since SSH gets one chapter of sixteen. It runs about $27, well under its $49.99 list price, so check the current price.
4. PAM Mastery by Michael W. Lucas
Most Linux distributions run sshd with UsePAM yes, so passwords and one-time codes are checked by PAM, not by sshd. That’s why your SSH two-factor setup can break in ways the SSH docs cannot explain, and this short book explains the stack that does the deciding.
Lucas covers both Linux-PAM and FreeBSD’s OpenPAM, and the parts an SSH admin reaches for come in this order:
- How a policy reaches a yes or a no
- Debugging a policy that locks people out
- Time-based one-time passwords
- Using SSH keys to authenticate things other than SSH
The one-time password chapter is the mechanism behind our SSH two-factor guide with Google Authenticator, so read it before you put a code prompt in front of every login. If you get the order of the PAM lines wrong, you either lock yourself out or let people in without the code.
Best for: anyone adding one-time codes to sshd, or debugging a PAM policy that locks people out. Pass on it if you only use key authentication, because PAM then runs just its account and session checks. Its policy examples come from the CentOS, Debian and FreeBSD releases of 2016, so expect file paths to differ on a current system. The print edition runs about $12; check the current price.
OpenSSH changed the defaults, not the model
Most rows below change what happens when you type the book’s examples against a current server, not how SSH works. The OpenSSH 10.3 row is the exception: it changes how certificate principals match, so check the principal examples in the CA chapter against the current man pages. The right column names the chapter to read with each release note open:
| Release | Date | What changed | Chapter it touches |
|---|---|---|---|
| OpenSSH 8.0 | Apr 2019 | ssh-keygen makes 3072-bit RSA keys by default | SSH Keys |
| OpenSSH 8.2 | Feb 2020 | FIDO/U2F hardware keys, as the ecdsa-sk and ed25519-sk key types | SSH Keys |
| OpenSSH 8.5 | Mar 2021 | UpdateHostKeys on by default, so clients learn a server’s newer host keys | Verifying Server Keys |
| OpenSSH 8.8 | Sep 2021 | RSA signatures using SHA-1 (ssh-rsa) disabled by default | Verifying Server Keys, SSH Clients |
| OpenSSH 9.0 | Apr 2022 | scp uses the SFTP protocol by default; hybrid NTRU Prime key exchange becomes the default | Copying Files, Encryption Algorithms |
| OpenSSH 9.5 | Oct 2023 | ssh-keygen generates Ed25519 keys by default | SSH Keys |
| OpenSSH 9.8 | Jul 2024 | Server blocks addresses that keep failing authentication (PerSourcePenalties); sshd splits into a listener and sshd-session; DSA off at build time | The OpenSSH Server |
| OpenSSH 10.0 | Apr 2025 | DSA removed; hybrid ML-KEM (mlkem768x25519-sha256) becomes the default key exchange | SSH Keys, Encryption Algorithms |
| OpenSSH 10.1 | Oct 2025 | Client warns when a session uses a key exchange that isn’t post-quantum (WarnWeakCrypto); agent sockets move from /tmp to ~/.ssh/agent | SSH Clients, the agent |
| OpenSSH 10.3 | Apr 2026 | A certificate with an empty principals section no longer matches every principal; wildcards in principals work for host certificates only | Certificate Authorities |
| OpenSSH 10.6 | Oct 2026 | LZ77 compression disabled after a side-channel finding, so compression saves less; usernames containing \ or $ refused on the command line; scp -R also starts printing a deprecation warning | SSH Clients, Copying Files |
| PuTTY 0.78 | Oct 2022 | OpenSSH certificates for user and host keys; NTRU Prime key exchange | PuTTY sections, Certificate Authorities |
| PuTTY 0.83 | Feb 2025 | ML-KEM key exchange | PuTTY sections |
Dates and wording come from the OpenSSH release notes and the PuTTY change log. Three of the rows bite you when you copy older examples onto a current system:
- A DSA key from an old example will not generate at all
- A current client refuses an appliance that only speaks
ssh-rsa - Double-quoted remote file names in scp can now fail, since scp talks SFTP instead of using the remote shell
Each has a fix you can apply per host rather than by weakening every connection: a new Ed25519 key, a Host block that re-enables the old signature for one appliance, or scp -O for the legacy protocol. The hardware key row is the one most worth acting on, and our guide to FIDO2 security keys for SSH picks it up where the book’s key chapter stops. On Windows, PuTTY now has newer company too, which our roundup of SSH clients for Windows compares.
Prove the key exchange from the client
Want to see the gap between the book and 2026 for yourself? Connect from a current client to a server that still runs the older defaults. In our lab, client01 was the Ubuntu host and gw01 the Rocky Linux host on its DEFAULT system crypto policy. A plain login still works, but a client from OpenSSH 10.1 onward prints a warning first (an older client, such as the 9.6 in Ubuntu 24.04, prints nothing):
ssh gw01 true
Three lines appear before the command runs:
** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html
Ask the client which key exchange it settled on. The verbose output names it on one line:
ssh -v gw01 true 2>&1 | grep 'kex: algorithm'
Against the Rocky host it fell back to classic curve25519:
debug1: kex: algorithm: curve25519-sha256
The same client against gw02, a second Ubuntu server, negotiates mlkem768x25519-sha256 and prints no warning. So the client is not the problem. Rocky’s sshd already supports ML-KEM, but the DEFAULT crypto policy leaves it off the server’s list. Red Hat added a PQ subpolicy to crypto-policies in RHEL 9.7, our Rocky host had it, and sshd only reads the new list after a restart:
sudo update-crypto-policies --set DEFAULT:PQ
sudo systemctl restart sshd
The subpolicy is system-wide, not an sshd setting. It enables ML-KEM key exchange and ML-DSA signatures for every library that follows the crypto policy, TLS in OpenSSL, GnuTLS and NSS included, and for the ssh client on that host. That’s why Red Hat recommends a reboot after the switch. Check what the server offers now. ML-KEM should lead the list:
sudo sshd -T | grep ^kexalgorithms
The first entry is the hybrid post-quantum exchange, followed by the classic ones as fallbacks:
kexalgorithms mlkem768x25519-sha256,curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512
Run the ssh -v check from client01 again and it reports kex: algorithm: mlkem768x25519-sha256, with no warning. One more test catches readers who copy key commands from older material. A client from OpenSSH 10.0 onward refuses to generate a DSA key at all:
ssh-keygen -t dsa
The key type is gone from the client:
unknown key type dsa
That’s the whole distance between SSH Mastery and a 2026 server. The mechanisms in the book hold, and two or three checks like these, run from the client side, show you which defaults moved on the hosts you actually manage. For the day-to-day commands that sit alongside the book, keep the SSH commands cheat sheet open.

