Next time during the session (until I log out (Logout)) when re-authorizing on the remote server, the code phrase is not requested, but authorization occurs immediately.
So it should be? That is, it seemed to me that if I had already logged in once (I entered a passphrase), then this is no longer required, regardless of the session.
you don’t mention the explicit use of the ssh-add program, so the very fact that when running $ ssh машина sometimes does not even ask for a password ( passphrase , “passphrase”) that encrypts the key looks strange.
you may have openssh version installed on your system> = 7.2. you can clarify the version, for example, like this:
$ ssh -V
In this version, it became possible using the addkeystoagent option addkeystoagent automatically transfer the decrypted key to the ssh-agent program This is what is written in the change log (see also the description in $ man ssh_config and $ man ssh if you have version openssh 7.2 or higher):
ssh (1): Add an AddKeysToAgent client to set it to 'yes', 'no', 'ask', or 'confirm', and defaults to 'no'. If it is running, when it is running (if it is set to 'confirm').
but by default this option is no (not transmit). it may be overridden in the global and / or user configuration file. see conclusion:
$ grep -i addkeystoagent /etc/ssh/ssh_config ~/.ssh/config
What kind of "beasts" are ssh-add and ssh-agent - I briefly described in this answer . after reading it, I hope it will become clearer why the decrypted key stored in the ssh-agent program memory can be used repeatedly during the x-session without having to enter a “passphrase” every time the $ ssh машина command starts, but the $ ssh машина will be “lost” when the x-session is restarted (i.e., after logout). because the ssh-agent process will be restarted, and will “forget” about all the decrypted keys.
How to make fully automatic authorization? That is, for example, so that after rebooting the computer, I simply dialed ssh host.example.com and ended up on a remote host, without entering a passphrase.
Here is my answer to an absolutely identical question.