Disable ads (and more) with a premium pass for a one time $4.99 payment
The ability to log in via SSH without needing to enter a password each time is typically accomplished by using public key authentication. While the option selected is related to managing authentication, the correct command for directly achieving password-less SSH logins is actually associated with the use of SSH keys.
ssh-keygen is the command used to create a pair of SSH keys (a public key and a private key). It is the first step in setting up the ability to log in without a password. By running this command, users generate a secure pair of keys that can be utilized for authentication.
ssh-agent is a program that holds private keys used for public key authentication. When a private key is added to the ssh-agent, it allows the user to enter their passphrase once for the key, and after that, it can manage the keys for the duration of the session, allowing for seamless SSH logins without needing to enter the password each time.
ssh-copy-id is a convenient way to install your public key on a remote machine’s authorized_keys file. This command simplifies the process of adding your public key to a remote server, enabling password-less logins once the keys have been properly set up.
scp is a command used for securely copying files over SSH, but does not