PostgreSQL
coub
express.js
freeware
git
jquery
laravel
links
linux
macos
mysql
node.js
php
powershell
python
ubuntu
vim
virtualbox
анекдот
блог
игры
интересно
стихи
цитаты
use it like this (in case your full dump gziped
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
macos: Insert key in Terminal app
March 06, 2025
We can fix this by re-assigning the F12 key:
- Remove F12 as key from System Settings->Mission Control
- Enable Use F1, F2, etc. keys as standard function keys in System Settings->Keyboard->Keyboard
- Go to Terminal->Preferences and set the default profile as Pro
- Go to Terminal->Preferences->Profiles->Keyboard and Replace F12 code with \033[2~
Powershell - Kill process
October 08, 2024
Almost same simple as ps ax | grep someth + kill -9 id
Full process list
Full process list
Get-ProcessResult
PS7 X:\Work> Get-Process
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
10 2,73 7,12 0,00 2504 0 amdfendrsr
20 6,74 17,40 0,00 3216 0 AppHelperCap
23 25,14 27,88 0,14 16676 1 ApplicationFrameHost
16 4,21 13,35 0,00 3100 1 atieclxx
10 1,99 6,41 0,00 2512 0 atiesrxx
......
Find process by name
Get-Process -Name *qbit*Result
PS7 X:\Work> Get-Process -Name *qbit*
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
151 132,88 156,22 5,67 10332 1 qbittorrent
Kill that process by Id
Stop-Process -Id 10332It's done.
Restore one mysql database from full dump
September 24, 2024
man mysql # search: /one-databaseOriginal solution is here
use it like this (in case your full dump gziped
gunzip -c all_db.sql.gz | sudo mysql -u root --one-database my_db_namerem: or withot sudo, but with -p to restore with password
powershell + ssh agent (+git rem)
August 02, 2024
Usual error in ps console looks like this
Let's fix this
Take a look on startup type
Admin privileges needed
Next, let's start this one and check
Original solution is here
REM
In case you always have password request on git pull/push even you have already added (ssh-add ~/.ssh/my-key-file-name) your ssh secret key, you have to set up environment variable for Win10
May be useful
$HOME\.ssh\config example (for sure you need to set up your own hostname, user & key file name)
In case you want to force passsword you can set up host like this
+ Useful commands
Starting ssh-agent on Windows 10 fails: "unable to start ssh-agent service, error :1058"
Let's fix this
> Get-Service ssh-agent Status Name DisplayName ------ ---- ----------- Stopped ssh-agent OpenSSH Authentication AgentThen check that the service has been disabled by running
Take a look on startup type
> Get-Service ssh-agent | Select StartType StartType --------- Disabled
Admin privileges needed
> Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Next, let's start this one and check
> Start-Service ssh-agent > Get-Service ssh-agent Status Name DisplayName ------ ---- ----------- Running ssh-agent OpenSSH Authentication Agent
Original solution is here
REM
In case you always have password request on git pull/push even you have already added (ssh-add ~/.ssh/my-key-file-name) your ssh secret key, you have to set up environment variable for Win10
Name | Value ---------------- GIT_SSH | C:\Windows\System32\OpenSSH\ssh.exeOr, set up your personal ssh path if needed.
May be useful
$HOME\.ssh\config example (for sure you need to set up your own hostname, user & key file name)
Host github.com
HostName github.com
User git
PreferredAuthentications publickey
AddKeysToAgent yes
IdentityFile ~/.ssh/my-gh-private-key
In case you want to force passsword you can set up host like this
Host my-host.com
HostName my-host.com
User my_login
PreferredAuthentications password
+ Useful commands
ssh-add -l # show added keyfiles ssh-add -D # delete added keys Start-Service ssh-agent # Admin access needed Stop-Service ssh-agent # Admin access needed
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 ;)