Recall & Review
beginner
What is key-based authentication in SSH?
Key-based authentication uses a pair of cryptographic keys (a private key and a public key) to securely log into a remote server without typing a password.
Click to reveal answer
beginner
What command generates an SSH key pair?
The command
ssh-keygen creates a new SSH key pair (private and public keys) on your local machine.Click to reveal answer
beginner
Where should the public key be placed on the remote server for key-based authentication?
The public key should be added to the
~/.ssh/authorized_keys file in the user's home directory on the remote server.Click to reveal answer
beginner
Why is it important to keep the private key secure?
The private key is like a secret password. If someone else gets it, they can access your servers without permission. So, it must be kept private and protected.
Click to reveal answer
intermediate
How does key-based authentication improve security compared to password authentication?
It avoids sending passwords over the network, uses strong cryptography, and can be combined with passphrases for extra protection, making it harder for attackers to gain access.
Click to reveal answer
Which file on the remote server stores the public keys allowed for SSH login?
✗ Incorrect
The
authorized_keys file contains the public keys that the server accepts for login.What command do you use to create a new SSH key pair?
✗ Incorrect
ssh-keygen generates a new SSH key pair.Which key must you keep secret to maintain security in key-based authentication?
✗ Incorrect
The private key must be kept secret because it grants access to your account.
What is the main benefit of using key-based authentication over password authentication?
✗ Incorrect
Key-based authentication allows logging in without typing a password, improving convenience and security.
Which command copies your public key to a remote server for easy setup?
✗ Incorrect
ssh-copy-id copies your public key to the remote server's authorized_keys file.Explain the steps to set up key-based authentication for SSH login.
Think about creating keys, placing the public key on the server, and connecting.
You got /4 concepts.
Why is key-based authentication considered more secure than password authentication?
Consider what happens when you use keys instead of typing passwords.
You got /4 concepts.