Verify that SSH permissions are applied to both public and private key files.

About this task

Procedure

  1. Check the SSH public key files by running the following command: ls -l /etc/ssh/*key.pub
  2. Verify that the owner is root, that the group owner is root, and that the files have permissions set to 0644 (-rw-r--r--).
  3. Fix any problems by running the following commands.

    chown root /etc/ssh/*key.pub

    chgrp root /etc/ssh/*key.pub

    chmod 644 /etc/ssh/*key.pub

  4. Check the SSH private key files by running the following command: ls -l /etc/ssh/*key
  5. Fix any problems by running the following commands.

    chown root /etc/ssh/*key

    chgrp root /etc/ssh/*key

    chmod 644 /etc/ssh/*key