You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
VERBOSE: Fingerprint for : <RSA_KEY Redacted>
Server SSH Fingerprint
Do you want to trust the fingerprint <RSA_KEY Redacted>
[] Y [] N [?] Help (default is "N"): Y
New-SSHSession : Session operation has timed out
At C:\Users<PATH>/test_connect.ps1:6 char:12
do you get "Do you want to trust the fingerprint" on every try ?
what timeout values on the server, how much time between question and answer ?
may you add host key manually ?
If I run Get-SSHTrustedHost | Remove-SSHTrustedHost before running the script it does ask "Do you want to trust the fingerprint".
The system I am trying to write for I believe has forwarding
Image shows how SSH connection is setup in a client I am trying create Script to run from PC to do some quick resolution tasks.
Script
Import-Module -Name Posh-SSH
$computer = ""
$Credentials = Get-Credential
$privateKeyPath = "C:\Users<PATH>.ssh\id_rsa"
$session = New-SSHSession -Port 22 -ComputerName $computer -KeyFile $privateKeyPath -Credential $Credentials -Verbose
if ($session.Connected -ne "True"){
Write-Output "Trouble connecting to Linux Jump Box. Script cannot be run. Please try again."
$session | Remove-SSHSession
exit
}
return $session
Invoke-SSHCommand $session -Command "ls ~"
Error Received
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
VERBOSE: Fingerprint for : <RSA_KEY Redacted>
Server SSH Fingerprint
Do you want to trust the fingerprint <RSA_KEY Redacted>
[] Y [] N [?] Help (default is "N"): Y
New-SSHSession : Session operation has timed out
At C:\Users<PATH>/test_connect.ps1:6 char:12
Trouble connecting to Linux Jump Box. Script cannot be run. Please try again.
The text was updated successfully, but these errors were encountered: