add: pwsh :Invoke-SshAdd

This commit is contained in:
qwjyh 2022-09-29 19:29:22 +09:00
parent d5103f0367
commit 2657b96fad

View file

@ -126,6 +126,19 @@ function Enable-SshAgent {
#>
sudo Set-Service -Name ssh-agent -StartupType Manual && Start-Service ssh-agent
}
# auto start ssh-agent and do ssh-add
function Invoke-SshAdd {
<#
.SYNOPSIS
Starts ssh-agent and do ssh-add
.DESCRIPTION
Starts ssh-agent as admin and do ssh-add, to add sshkeys to ssh-agent.
#>
Enable-SshAgent
ssh-add
}
# execute "ssh-add" to add keys