S
S
siriym2018-03-24 02:26:00
PowerShell
siriym, 2018-03-24 02:26:00

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

As a result, a window appears and asks for a password. Please tell me how to make this window with a password request not appear. I connect to ESXi 5.5.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question