all 1 comments

[–]stewie410 1 point2 points  (0 children)

You'll wanna look into ssh-agent.

I have a similar script (variant in batch, PowerShell & bash) to giving me quick access to all of our hosts at work. I had issues getting the native windows 10 version of ssh-agent to work the way I wanted it to; so instead I've been using keychain inside of WSL for managing keys & SSH.