Secure Collaboration: Managing SSH Keys and Access Controls Quiz Quiz

Explore key practices for managing SSH keys and access controls to ensure secure team collaboration. This quiz tests your understanding of authentication methods, access rights, and effective management of sensitive credentials in collaborative environments.

  1. Understanding SSH Key Authentication

    Which statement best describes the advantage of using SSH key pairs over passwords for remote server access?

    1. SSH key pairs only work if the client and server are on the same network.
    2. Passwords are less likely to be forgotten when compared to SSH keys.
    3. Using SSH key pairs reduces the need for two-factor authentication.
    4. SSH key pairs provide stronger cryptographic authentication than passwords.

    Explanation: SSH key pairs are considered more secure than passwords because they use asymmetric encryption, making unauthorized access much harder. While passwords might be easily forgotten, this is unrelated to their security. SSH key pairs can be used over different networks, not just the same one. While SSH keys improve security, they do not remove the need for two-factor authentication in high-security environments.

  2. Managing Team Access

    If multiple team members require access to a single server, which is the most secure way to manage their SSH keys?

    1. Create personal accounts for each team member and assign their public keys.
    2. Assign all team members to use the default 'root' account with one key.
    3. Share a single private key file among all team members.
    4. Email the server password to the team along with a shared key.

    Explanation: Assigning each team member a personal account with an individual key allows for granular control and easy revocation if needed. Sharing a private key compromises security, as does using the default 'root' account for everyone. Sending passwords and keys through email is insecure and violates best practices for sensitive credential handling.

  3. Revoking Access Safely

    A team member is leaving the project. What is the most appropriate action to ensure their SSH access is instantly revoked?

    1. Update the server’s operating system to the latest version.
    2. Remove their public key entry from the server's authorized_keys file.
    3. Ask the departing member to delete their private key.
    4. Change the server’s hostname.

    Explanation: By removing the team member's public key from the server's authorized_keys file, you ensure they can no longer access the server. Changing the hostname or updating the operating system does not affect individual access. Relying on the departing member to delete their private key is ineffective, as they may not comply or could have backups elsewhere.

  4. Securing Sensitive SSH Keys

    What is the recommended practice for storing private SSH keys used for secure collaboration?

    1. Store the private key in a shared cloud folder for easy access by all team members.
    2. Encrypt the private key with a passphrase and keep it in a user’s home directory with restricted permissions.
    3. Upload the private key to the server for convenience.
    4. Keep the private key unencrypted for faster authentication.

    Explanation: Encrypting the private key with a passphrase and setting strict file permissions adds layers of protection against unauthorized access. Sharing private keys in a public or cloud folder exposes the key to multiple parties and increases risk. Leaving keys unencrypted is unsafe, and uploading private keys to the server is not recommended as it defeats the purpose of public/private key separation.

  5. Principle of Least Privilege in Access Control

    How does applying the principle of least privilege help secure SSH-based collaboration within a team?

    1. By removing all public keys from the server except for one shared key.
    2. By allowing all users to have administrative privileges to make collaboration easier.
    3. By ensuring each user only has the minimum access necessary to complete their tasks.
    4. By giving every user access to all directories by default.

    Explanation: Granting users only the permissions required for their work minimizes potential damage caused by accidental or malicious actions. Allowing all users administrative access contradicts security best practices. Using a single shared key or providing unrestricted directory access creates vulnerabilities and reduces accountability.