Show the effective OpenSSH client configuration for a host
Build a paste-ready command, then review its compatibility and effects before running it.
Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementssshssh must be installed and available on PATH.
Version supportssh Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalscanonicalizehostname falseRepresentative successful output; values vary with the selected target and system state.
Known errorsssh: command not foundssh is missing or is not available on PATH.
Verifyssh -G {{host}} | sortThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01sshCommandRuns the ssh stage of this one-liner.
02-GOptionPrints the fully evaluated client configuration and exits without connecting.
03<host>ParameterA value supplied in the Fill parameters section.
04|PipelinePasses the output on the left to the command on the right.
05sortCommandRuns the sort stage of this one-liner.
Example input
ssh -G app01.example.com | sort
Example output
canonicalizehostname false
hostname app01.example.com
identityfile ~/.ssh/id_ed25519
port 22
proxyjump bastion.example.com
user deploy
Illustrative output — exact values vary by system and data.
Official sources
Related commands