Posh-SSH
Posh-SSH copied to clipboard
New-SSHSession "A connection attempt failed ..."
Hello,
I've been experienced some issues with using the command New-SSHSession to connect to hosts in the other side of the world. Pings to the host are 160-180ms which confirms longer connection time.
Using the following command gives the following error;
New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true
New-SSHSession : Connection failed to establish within 10000 milliseconds.
At line:1 char:1
+ New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], SshOperationTimeoutException
+ FullyQualifiedErrorId : SSH.NewSshSession
Using following command gives the following error;
New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true -ConnectionTimeout 100 -KeepAliveInterval 100 -OperationTimeout 100
New-SSHSession : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has fa
iled to respond
At line:1 char:1
+ New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true -Connection ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], SocketException
+ FullyQualifiedErrorId : SSH.NewSshSession
(Credential parameter removed for testing purposes)
Testet with PuTTY, working fine.
Any idea what is causing this?
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
I would say check the logs on the linux host and do a PCAP to see if it shoes any response not shown.
Sent from my iPhone
On Jun 25, 2019, at 3:58 AM, Oliver Karstoft [email protected] wrote:
Hello,
I've been experienced some issues with using the command New-SSHSession to connect to hosts in the other side of the world. Pings to the host are 160-180ms which confirms longer connection time.
Using the following command gives the following error; New-SSHSession -ComputerName 192.169.66.87 -Port 22 -AcceptKey:$true
New-SSHSession : Connection failed to establish within 10000 milliseconds. At line:1 char:1
- New-SSHSession -ComputerName 192.169.66.87 -Port 22 -AcceptKey:$true
+ CategoryInfo : OperationTimeout: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], SshOperationTimeoutException + FullyQualifiedErrorId : SSH.NewSshSessionUsing following command gives the following error; New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true -ConnectionTimeout 100 -KeepAliveInterval 100 -OperationTimeout 100
New-SSHSession : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has fa iled to respond At line:1 char:1
- New-SSHSession -ComputerName ### -Port 22 -AcceptKey:$true -Connection ...
+ CategoryInfo : InvalidOperation: (Renci.SshNet.SshClient:SshClient) [New-SSHSession], SocketException + FullyQualifiedErrorId : SSH.NewSshSession(Credential parameter removed for testing purposes)
Testet with PuTTY, working fine.
Any idea what is causing this?
$PSVersionTable.PSVersion
Major Minor Build Revision
4 0 -1 -1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
update: i could ssh to target server. have to use FQDN instead of IP and it works well. thanks all for your advices.