IdentityFile
IdentityFile is a directive used in the SSH client configuration to specify private key files that should be used for authentication when connecting to a host or a pattern of hosts. It appears in configuration files such as ~/.ssh/config or /etc/ssh/ssh_config and controls which private keys the client will attempt to use for public key authentication.
The directive can be used multiple times within a host or global section to provide a list
The -i command-line option serves a similar purpose for a single connection, allowing you to specify a
Security considerations include protecting private keys with appropriate file permissions, using passphrases where feasible, and leveraging
See also: IdentitiesOnly, IdentityAgent, ssh_config, and the -i option for the SSH client.