This document describes the validation rules for SSH configuration options in the persistent-ssh-agent package.
- Valid range: 1-65535
- Example:
Port 22
- Any valid hostname or IP address
- Example:
Hostname github.com
- Any valid username
- Example:
User git
- Valid file path
- Can have multiple entries
- Example:
IdentityFile ~/.ssh/id_rsa
- Valid options: yes, no, accept-new, off, ask
- Example:
StrictHostKeyChecking yes
- Valid options: yes, no
- Example:
BatchMode yes
- Valid options: yes, no
- Example:
PasswordAuthentication no
- Valid options: yes, no
- Example:
PubkeyAuthentication yes
- Valid options: yes, no
- Example:
Compression yes
- Non-negative integer
- Example:
ConnectTimeout 30
- Non-negative integer
- Example:
ServerAliveInterval 60
- Non-negative integer
- Example:
ServerAliveCountMax 3
- Any valid command string
- Example:
ProxyCommand ssh -W %h:%p jumphost
- Valid options: yes, no
- Example:
ForwardAgent yes
- Valid options: yes, no
- Example:
ForwardX11 no
- Valid options: yes, no, force, auto
- Example:
RequestTTY auto
- Any valid environment variable pattern
- Can have multiple entries
- Example:
SendEnv LANG LC_*
- Valid options: yes, no, ask, auto, autoask
- Example:
ControlMaster auto
- Valid file path
- Example:
ControlPath ~/.ssh/cm-%r@%h:%p
- Valid options: yes, no, or time duration in seconds
- Example:
ControlPersist 1h
- Valid options: yes, no, always
- Example:
CanonicalizeHostname yes
- Non-negative integer
- Example:
CanonicalizeMaxDots 1
- List of domain names
- Example:
CanonicalizeDomains example.com example.net
The configuration parser will:
- Skip invalid configuration keys
- Log warnings for invalid values
- Use default values when invalid values are provided
- Validate all values before applying them
- Always use the most restrictive security settings appropriate for your use case
- Set appropriate timeouts to prevent hanging connections
- Use multiplexing when making multiple connections to the same host
- Enable compression for slow connections
- Use canonical hostnames when working with complex network setups