ubuntu:ssh:use_ssh_without_a_password
Table of Contents
Ubuntu - SSH - Use SSH without a password
Configure SSH to use key-based authentication, which allows connecting to a remote server without entering a password.
This method uses a pair of cryptographic keys to authenticate to the SSH server, enhancing security.
Generate SSH keys
Generate SSH keys using:
ssh-keygen
NOTE: This command creates a private key and a corresponding public key.
- The private key is kept secret and secure by the user, while the public key can be shared with any SSH server you wish to connect to.
Copy the SSH public key to a remote server
Copy the SSH public key to a remote server using:
ssh-copy-id <username>@IP_address_of_the_server
NOTE: This command appends the public key to the remote user ~/.ssh/authorized_keys file, allowing key-based authentication.
ubuntu/ssh/use_ssh_without_a_password.txt · Last modified: 2025/05/21 09:37 by peter