Monthly Archive: June 2020

Use ssh-agent to save ssh passphrase in Window 10

Ref: https://stackoverflow.com/a/52113739

Ref: https://stackoverflow.com/a/18683544

Problem: When using SSH to connect other server, I don’t want to type passphrase everytime:)

For Windows 10 you need PowerShell to active ssh-agent in order to save passphrase.

Solution: First use Administrator right to open PowerShell (Windows PowerShell).

Then enter below command to active ssh-agent:

local Administrator PowerShell 
Set-Service ssh-agent -StnartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent

Then now you can add the key file (My file store in C:\Users\user.ssh\id_rsa), it will prompt a message to obtain the passphrase.

ssh-add C:\Users\user.ssh\id_rsa
(Enter your passphrase)

Eventually, ssh-agent will store your passphrase now. You can also enter

ssh-add -l

to check out the record.

Update npm on Windows 10

ref:https://stackoverflow.com/a/31520672

Problem: Want to deploy node.js, but npm is too old.

Solution: Run PowerShell as Administrator (search “PowerShell”, right click and select Run as Administrator)

then run below command

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
Close Bitnami banner
Bitnami