MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.28k stars 21.46k forks source link

Missing chmod: bad mode for /home/$USER/.ssh/authorized_keys #47387

Closed andreas-wilm closed 4 years ago

andreas-wilm commented 4 years ago

Hello there,

regarding the key access (https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/hpc/setup-mpi#set-up-ssh-keys-for-mpi):

on most systems (depends on the umask), the newly created file /home/$USER/.ssh/authorized_keys will have world read permission. A login with key will then fail with the following (/var/log/secure on Ubuntu): sshd[pid]: Authentication refused: bad ownership or modes for file /home/$USER/.ssh/authorized_keys

A chmod 600 .ssh/authorized_keys fixes this and should be added to the section.

Thanks, Andreas


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

jakaruna-MSFT commented 4 years ago

@andreas-wilm Thanks for the feedback.

@Potapy4 raised a pull request to fix this issue.

jakaruna-MSFT commented 4 years ago

@Potapy4 Thanks for your contribution

jakaruna-MSFT commented 4 years ago

@andreas-wilm I will close this out for now. Once the document author approves the pull request, Changes will reflect on the document.