Posh-SSH-Schlüsselauthentifizierung

$ComputerName = "foo.bar"
$UserName = "root"
$KeyFile = "C:\key.pem"
$nopasswd = new-object System.Security.SecureString
$Crendtial = New-Object System.Management.Automation.PSCredential ($UserName, $nopasswd)

New-SSHSession -ComputerName $ComputerName -Credential $Crendtial -KeyFile $KeyFile
Dull Dugong