A user can create an SSH identity and tell other hosts to trust it without asking for a password: the password never goes through the network.
The identity has a public and a private part.
The passphrase can be kept in local memory so that it only needs to be entered once.