For the client process:

More on SSH Public Key Authentication

SSH ("secure shell") is the standard method of securely connecting
to servers through the command-line. In addition to
username/password combos, public key encryption is a way to verify
users (that is, "authenticate") before letting them log into a
server.

When performing tasks across a secure network frequently, especially when
needing to do so automatically, logging into a server by typing a
username/password is not always feasible. Public key
authentication offers a secure way around this -- a sort of
encrypted version of "save this password" -- that lets you log
silently (without a password). Silent authentication is commonly
used among command-line script programmers as a result.

Silent authentication is achieved by creating
a pair of public and private keys with an empty passphrase and
putting the public key on the server you log into. Configuring
silent public key authentication only needs to be done once.