PostgreSQL
coub
express.js
freeware
git
jquery
laravel
links
linux
macos
mysql
node.js
php
powershell
python
ubuntu
vim
virtualbox
анекдот
блог
игры
интересно
стихи
цитаты
You have to
login
to post a new comment.
windows/powershell: WARNING: UNPROTECTED PRIVATE KEY FILE!
March 21, 2025
Issue: you're trying to add your ssh key in powershell, and see this
Our goal is to make key accessible for only one (current one expected) user and nobody else. Check out screenshots below.
Right Click on your private key flie -> properties -> security tab
Now keep calm, that will be painfull enough (WIN 10 example)
Additional note: start and stop ssh-agent service (more details):
ssh-add X:\Work\.ssh\wired-mind @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions for 'X:\\Work\\.ssh\\wired-mind' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.Permissions for are too open. Ok. I've digged a lot around but did not found good working solution in powershell script/commands (probably they were fine before *win updates.. who knows). So I decided to make a short note how to fix that in GUI.
Our goal is to make key accessible for only one (current one expected) user and nobody else. Check out screenshots below.
Right Click on your private key flie -> properties -> security tab
Now keep calm, that will be painfull enough (WIN 10 example)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Then click ok, ok, OK, OOK, untill you see this. Only your current user with full access.
One more Click OK, please. Now you done. That's why I love chmod ;)
Additional note: start and stop ssh-agent service (more details):
# start Start-Service ssh-agent # check service status Get-Service ssh-agent # stop (admin permissions needed) Stop-Service ssh-agent
Comments
No comments here yet.