How to disable the usage of the SSH agent
How to disable the usage of the SSH agent?
Define the SSH option IdentityAgentRun with the value 'none' when connecting to a system to disable the usage of the SSH agent.
ssh -o IdentityAgent=none user@hostnameThe ssh command can be instructed to avoid using the SSH agent and its known identities with the -o IdentityAgent=none option. This sets the option IdentityAgent to disable the SSH agent.
Command line usage
To use this option on the command line, specify the setting and set it to no.
ssh -oStrictHostKeyChecking=no user@hostname
Usage in configuration file
This setting can also be configured in /etc/ssh_config to define it as its default. An alternative is to define it per host, in the file in your home directory ~/.ssh/config .
To make it a default, define a generic section at the bottom of your config file.
Host *
# Only use the Identities that are specified with IdentityFile
IdentitiesOnly yes
# Define primary key
IdentityFile /home/%u/.ssh/id_ed25519
# Disable entities known to ssh-agent
IdentityAgent none
# Avoid password authentication
PasswordAuthentication no