[Solved] A remote session might have ended

You may get the following error while trying to use the New-PSSession or the Enter-PSSession cmdlets with the SSHTransport parameter.

This happens because the cmdlet doesn’t find the ssh.exe file.

You have two solutions:

  • Install SSH and ensure ssh.exe is accessible through one of the folders from the Path environment variable
  • Copy ssh.exe in one of the following folders from the Path environment variable like
    • C:\Windows
    • C:\Windows\System32

    Please note that all dependencies of ssh.exe must also be present in the same directory (in my case it was the libcrypto.dll file)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s