Answer the question
In order to leave comments, you need to log in
New-SSHSession authentication without entering a password?
Good day. I am writing a script in powershell 5.
$username = "user"
$password = "passuser"
$credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$password
# Create SSH Session
$ssh = New-SSHSession -ComputerName 192.168.1.232 -Credential $credential -AcceptKey 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question