I find that once I connect to my Amazon EC2 server using the provided private key via
ssh -i /path/to/privkey.pem, subsequent attempts to ssh to the server do not require specifying the path to the private key file.
According to the man page:
-i identity_file Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Identity files may also be specified on a per-host basis in the configu- ration file. It is possible to have multiple -i options (and multiple identities specified in configuration files).
This doesn't really shed any light on what it's doing behind the scenes. Does it store a copy of the "identity" somewhere, or does it store some kind of link to the file provided?
I am suspecting it is the former (in which case, where could I go and find it?) because I have tested by moving the key-file to a different location, but my ssh connection (without specifying the private key with
-i) still succeeds afterwards.