Soru

Zorluk: ZormacOS and Linux Operating System Features and Tools

A Linux technician is attempting to establish a remote administration session using a custom private key stored at `~/.ssh/id_rsa`. Upon executing the authentication command `ssh -i ~/.ssh/id_rsa [email protected]`, the terminal rejects the key and terminates the connection, displaying a warning that the private key file permissions of `0777` are too open and unprotected. Which of the following commands must the technician execute to assign the proper restrictive permissions so that SSH accepts the key file?

  1. chmod 600 ~/.ssh/id_rsaCevap
  2. B
    chmod 755 ~/.ssh/id_rsa
  3. C
    chown 600 ~/.ssh/id_rsa
  4. D
    chmod +x ~/.ssh/id_rsa

Cevap

The technician must run 'chmod 600 ~/.ssh/id_rsa' to grant read and write permissions exclusively to the file owner.
SSH clients enforce strict file mode checks on private key files to protect cryptographic credentials. The command 'chmod 600 ~/.ssh/id_rsa' grants read (4) and write (2) privileges solely to the file owner, while setting group and world permissions to 0. This removes all external access and satisfies SSH security validation.

Adım Adım Çözüm

1
Analyze the SSH client error requirement
SSH clients strictly refuse private key files accessible by other user accounts on the local system.
Open permissions (such as 0777 or 0644) expose sensitive private key material to unauthorized system users.
2
Determine the required permission bits in octal format
The file owner needs read (4) and write (2) access (summing to 6), while group (0) and world (0) must have zero access.
The 600 permission profile enforces owner-only access without unnecessary executable attributes.
3
Select the proper command syntax to change permissions
Executing 'chmod 600 ~/.ssh/id_rsa' updates the file mode.
The 'chmod' utility modifies file access control bits in Unix-like operating systems.

Anahtar Kavram

Linux file permission management and SSH client identity security standards
Tahmini Süre:1m 30s
Bu soruyu puanla