Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Openssh Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-openssh-knowledge-patch-nevaberry-plugins)
---
name: openssh-knowledge-patch
description: OpenSSH
version: "10.6"
license: MIT
metadata:
author: Nevaberry
---
# OpenSSH Knowledge Patch
Load this skill when upgrading OpenSSH, adapting client or server configuration,
packaging the server, or working with agents, keys, certificates, and file transfers.
Use the quick reference for upgrade-sensitive behavior and common operations;
the topic references contain the full guidance and source-batch attributions.
## Reference index
| Reference | Topics |
| --- | --- |
| [Configuration and Authentication](references/configuration-and-authentication.md) | Client matching and expansion; usernames; authorization files; forwarding restrictions; configuration dumps; authentication limits; GSSAPI; PAM; packaging and platforms |
| [Connections and Agents](references/connections-and-agents.md) | Multiplexing; rekeying; traffic marking; keepalives; timeouts; compression; agent sockets, cleanup, and activation; key lifetimes; live inspection |
| [Cryptography, Certificates, and Keys](references/cryptography-and-keys.md) | Key exchange; hybrid signatures; algorithm allow-lists; principals; revocation; FIDO and PKCS#11; signing; export; private-key storage |
| [File Transfer](references/file-transfer.md) | Transfer multiplexing; remote-to-remote copying; permissions; download containment; SFTP server options, copies, listings, and directory creation |
## Upgrade-sensitive behavior and deprecations
### Password authentication on musl Linux without PAM
Upgrade Portable OpenSSH servers built and run without PAM support on musl-based
Linux to 10.6p2 for the password authentication bypass fix.
### Hybrid signature migration
10.4 adds an experimental composite signature scheme combining ML-DSA 44 and
Ed25519; using it requires explicitly adding the algorithm to relevant allow-lists,
such as `HostKeyAlgorithms` and `PubkeyAcceptedAlgorithms`.
10.6 enables `ssh-mldsa44-ed25519` by default. Regenerate or remove keys from the
10.4 experimental implementation and replace the old `@openssh.com` algorithm
spelling in explicit allow-lists.
### Remote-to-remote copying
`scp -R` still performs the transfer from the source host in 10.6 and emits a
deprecation warning on standard error. A future release will ignore `-R` and route
the transfer through the machine running `scp`, which is already the default.
### Forwarding restrictions
In 10.0, `DisableForwarding yes` also blocks agent and X11 forwarding, including
on servers configured to permit them. In 10.4, it overrides `PermitTunnel yes`,
including where tunnel forwarding was explicitly enabled.
In 10.6, the `restrict` option in `authorized_keys` blocks tunnel forwarding even
when `sshd_config` enables it with `PermitTunnel`.
### Destination usernames and jump hosts
10.3 validates command-line usernames before expanding configuration tokens and
validates usernames and hostnames supplied via `-J` or `-oProxyJump=...` on the
command line. In 10.6, `ssh` rejects command-line destination usernames containing
a dollar sign or backslash. Set such usernames with the client `User` directive.
### Configuration dumps and long SFTP server invocations
`sshd -G` emits mixed-case directive names in 10.4, and 10.6 corrects option casing
in `ssh -G`. Match directive names case-insensitively in scripts parsing either.
10.4 honors options after the ninth argument to `internal-sftp`; review long
invocations on upgrade because previously ignored restrictions can take effect.
### Rekeying compatibility
From 10.3, peers lacking rekeying support can connect initially but lose the
connection when the transport next needs to rekey. In 10.4, both `ssh` and `sshd`
disconnect peers sending non-key-exchange messages during post-authentication
rekeying. Check peer implementations against RFC 4253 section 7.1 if connections
start dropping during rekeying.
### Server packaging and sandbox support
Server packages for 10.0 must install `sshd-auth`. Some messages previously logged
under `sshd-session` now appear under `sshd-auth`.
In 10.4 Linux builds with the seccomp sandbox enabled, failure to enable seccomp
or `NO_NEW_PRIVS` is fatal. For targets lacking these facilities, disable the
sandbox at configure time. `sshd` builds against macOS SDK 27 or later lack sandbox
support because that SDK removed the sandboxing API OpenSSH used.
### File descriptor passing and legacy platforms
On platforms lacking file descriptor passing and requiring root for PTY allocation,
such as QNX 6 and SCO OpenServer 5, `sshd` forcibly disables `GatewayPorts` and
`StreamLocalForwarding` and will drop support for those platforms in a future
release. Portable OpenSSH 10.6 removes `--disable-fd-passing`.
### GSSAPI authentication
10.4 fixes a pre-authentication denial of service on servers with
`GSSAPIAuthentication` enabled. On affected servers, `PerSourcePenalties` can
penalize attempts; `MaxAuthTries` is ineffective against this issue.
`GSSAPIStrictAcceptorCheck` is ineffective when the SSH server is joined to
Windows Active Directory.
## Configuration and connection quick reference
### Finite-field Diffie–Hellman
10.0 removes finite-field Diffie–Hellman from the default server `KexAlgorithms`.
For a peer requiring a fixed group, explicitly enable the required server method,
for example `KexAlgorithms +diffie-hellman-group14-sha256`.
For group exchange, compiled-in groups are a fallback only if the moduli file is
absent. An existing file must contain a group in the client's requested range.
### Client expansion and conditional configuration
10.0 expands environment variables and percent tokens in `User` and `SetEnv`.
In `User`, choose tokens other than the self-referential `%r` and `%C`.
```sshconfig
Host work
User ${WORK_SSH_USER}
SetEnv SSH_TARGET=%h
```
`Match version` is available in both configuration files. The client also supports
`Match sessiontype` with `shell`, `exec`, `subsystem`, or `none`, and `Match command`
for the remote command supplied on the command line. Use `Match tagged ""` or
`Match command ""` to match an empty tag or command.
An active client `RefuseConnection` terminates `ssh` and displays its message.
### Authentication attempts and key-exchange warnings
By default, the first six queries about whether a public key is acceptable are
exempt from `MaxAuthTries`. `PubkeyAuthOptions max-pk-ok:10` in `sshd_config` allows
ten exempt probes before further probes count as authentication failures.
`sshd` logs when a client negotiates key exchange without post-quantum protection;
disable this default warning with `WarnWeakCrypto no` in `sshd_config`.
### Keepalives, timeouts, and configuration precedence
In both configuration files, `TCPKeepAlive all` enables keepalives on the SSH
connection and forwarding sockets; `yes` and `transport` enable them on the SSH
connection alone. Both `ssh` and `sshd` accept fractional channel timeouts, such as
`ChannelTimeout session=1.5s`. A general `session` rule applies to shell channels.
For a connection that has opened channels, `UnusedConnectionTimeout` starts after
the final channel closes, including when `ChannelTimeout` closes it.
`StreamLocalBindMask` follows first-match precedence in both configurations; the
client also honors it inside `Host` and `Match` blocks.
## Agents, keys, and live inspection
### Agent socket placement and cleanup
`AgentSocketPath user:.ssh/agent` is the server default for forwarded
`SSH_AUTH_SOCK`, using a directory under the user's home.
`AgentSocketPath shared:/tmp` uses a randomly named subdirectory under `/tmp`.
Use `ssh-agent -A user:.ssh/agent` for a local socket directory under your home or
`ssh-agent -A shared:/tmp` for a shared base directory.
By default, `ssh-agent` cleans stale sockets for the local hostname on startup.
Use `-U` to skip cleanup, `-u` to clean and exit, or `-uu` to include other hostnames.
### Agent keys and token verification
`kill -USR1 "$agent_pid"` clears all keys from that agent without socket access.
Certificates added with `ssh-add` are removed five minutes after expiry; use
`ssh-add -N ~/.ssh/id_ed25519` to omit the automatic certificate lifetime when
loading the identity and its certificate.
Use `ssh-add -P` to skip PIN entry when loading from FIDO or PKCS#11 tokens that
permit it, for example `ssh-add -P -K` for FIDO resident keys.
When importing resident keys, `ssh-keygen` and `ssh-add` check `credProtect` and
preserve any requirement for PIN or biometric verification.
### Certificate signatures and key export
In 10.6p2, `ssh` accepts `ssh-mldsa44-ed25519` CA signatures on host certificates
by default, and `sshd` does the same for user certificates.
Use `ssh-keygen -e -m PKCS8 -f ~/.ssh/id_ed25519.pub` for Ed25519 PKCS#8 output.
Use `ssh-keygen -e -m hexdump -f ~/.ssh/id_ed25519.pub` to print the SSH wire-format
key blob in hexadecimal.
### Live connection and agent inspection
Use the interactive `~I` escape or `ssh -O conninfo user@host` for connection
details, and `ssh -O channels user@host` to list channels on a multiplexed
connection. The `~I` display includes local and remote SSH version strings.
`ssh` and `sshd` log active channel and session information on `SIGINFO` where
that signal is available. `ssh-add -Q` lists extensions reported by the connected
agent through the `query` extension.
## File-transfer quick reference
### Multiplexing transfers
`scp` and `sftp` pass `ControlMaster no` to `ssh`. To multiplex transfers, start the
master with `ssh` first and point the transfer clients at its `ControlPath`.
### SFTP containment and directory creation
10.4 fixes a destination containment issue in command-line downloads such as
`sftp host:/path .`. Update clients using this form against untrusted servers to
keep downloads in the intended local location. Recursive SFTP copies validate
server-returned paths more strictly to keep downloads inside the selected
destination directory.
Inside `sftp`, `mkdir -p path/to/dir` creates missing remote parent directories;
`lmkdir -p path/to/dir` does the same locally. Existing directories are accepted.