darkoperator / darkoperator/Posh-SSH
Set-SCPItem : Could not load file or assembly 'Renci.SshNet, Version=2017.0.0.0
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
We are installing Posh-SSH from gallery using Install-Module Posh-SSH and hitting this error when using Set-SCPItem. This has been working fine for months until this week we started seeing this. When I check the version of the Renci.SshNet.dll in the assembly path it shows version 2020 not 2017.
`PS C:\ArcBox> Get-InstalledModule -Name Posh-SSH
Version Name Repository Description
3.0.2 Posh-SSH PSGallery Provide SSH and SCP functionality for executing commands against remote hosts.
PS C:\ArcBox> Update-Module Posh-SSH
PS C:\ArcBox> [System.AppDomain]::CurrentDomain.GetAssemblies() | ? { $_.Location -like 'ssh' }
GAC Version Location
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\Newtonsoft.Json.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\Renci.SshNet.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\SshNet.Security.Cryptography.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\PoshSSH.dll
PS C:\ArcBox> Set-SCPItem -ComputerName $CentOSVmIp -Credential $linCreds -Destination "/home/$nestedLinuxUsername" -Path "$agentScript\installArcAgentModifiedCentOS.sh" -Force
Set-SCPItem : Could not load file or assembly 'Renci.SshNet, Version=2017.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106' or one of its dependencies.
The system cannot find the file specified.
At line:1 char:1
- Set-SCPItem -ComputerName $CentOSVmIp -Credential $linCreds -Destinat ...
-
+ CategoryInfo : NotSpecified: (:) [Set-SCPItem], FileNotFoundException + FullyQualifiedErrorId : System.IO.FileNotFoundException,SSH.SetScpItem
`

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Set-SCPItem with Posh-SSH 3.0.2 and inspect the assemblies loaded from the module's Assembly directory, especially Renci.SshNet.dll. Trace the command's dependency on Renci.SshNet version 2017.0.0.0 and confirm that the corrected behavior allows the supplied SCP command to complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- devops, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100