ssh while ssh-agent is running

Sam Darwin samuel.d.darwin at gmail.com
Tue Oct 1 03:37:18 AEST 2024


Hi,
I run into a certain problem from time to time.

1. Configure and launch ssh-agent.
2. That's usually perfect.
3. Occasionally, connect to a different and less common remote server.
 Use ssh -i keyfile
4. ssh -i keyfile fails.  Because ssh-agent doesn't know about that key.

If you are specifying a key "-i key", then you are specifying a key, and
clearly don't need to use the keys from ssh-agent. Could ssh prefer the key
from the command line? Give that precedence, over using the ssh-agent keys?
Many executables make choices based on multiple input parameters, with
information from the command-line having the top priority.
What is your opinion?

Thanks,
Sam


More information about the openssh-unix-dev mailing list