Azure / Azure/azure-linux-extensions
AADSSHLoginForLinux - Permissions for 'filename' are too open.
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
I'm unable to use the AADSSHLoginForLinux extension as every time I try to connect to the VM via:
`az ssh vm -n linux_virtual_machine_name -g resource_group_name --subscription subscription_name`
I always receive the following error
`OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
Bad permissions. Try removing permissions for user: BUILTIN\\Users (S-1-5-32-545) on file C:/Users/XXXXXXXX/AppData/Local/Temp/aadsshcertm3sm0ed8/id_rsa.pub-aadcert.pub.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'C:\\Users\\XXXXXXXX\\AppData\\Local\\Temp\\aadsshcertm3sm0ed8\\id_rsa.pub-aadcert.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "C:\\Users\\XXXXXXXX\\AppData\\Local\\Temp\\aadsshcertm3sm0ed8\\id_rsa.pub-aadcert.pub": bad permissions
XXXXXXX@mydomain.com@10.132.1.4: Permission denied (publickey).`
The file is obviously a temporary one, I can't change permission.
The VM is running Ubuntu Server 22.04 LTS;
AADSSHLoginForLinux 1.0.2301.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `az ssh vm` using AADSSHLoginForLinux 1.0.2301.1, Windows OpenSSH 8.6p1, and Ubuntu Server 22.04 LTS. Start by tracing how the temporary `id_rsa.pub-aadcert.pub` file is created and passed to SSH; done means the connection succeeds without the bad-permissions or ignored-private-key errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python, ubuntu
- Domain
- authentication, cloud, operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100