Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

posh-ssh key authentication

$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
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #key #authentication
ADD COMMENT
Topic
Name
1+2 =