A ssh-key is a text file but the file permissions need to be set properly otherwise the ssh
command (openssh) will refuse to use it. The key is in the .ssh folder under your user. In linux it's one command to set
the permissions:
chmod 600 id_rsa
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions for 'C:\\Users\\YourUserId/.ssh/id_rsa' 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\\YourUserId/.ssh/id_rsa": bad permissions
cd .ssh icacls .\id_rsa /reset icacls .\id_rsa /inheritance:r icacls .\id_rsa /grant:r "YourDomain\YourUserId:F" after the above commands it should then look like this: PS C:\Users\YourUserId\.ssh< icacls .\id_rsa .\id_rsa YourDomain\YourUserId:(F)
echo $env:username
Get-ADDomain | Select-Object Name or Get-ADDomain | Select-Object NetBIOSName