Posh-SSH
Posh-SSH copied to clipboard
Set-SCPItem : Cannot process argument because the value of argument "path" is null
Hello all,
With the command
Set-SCPItem -Path ".\file" -Destination "/home/pi/" -ComputerName $ComputerName -KeyFile $KeyFile -Credential $Credential -Port 2222
I always get Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
My private key has a password and I coded it like this :
$keyPassphrase = "aaaaaa"
$KeyFile = "C:\Users\USER\.ssh\id_rsa"
$secKeyPassphrase = ConvertTo-SecureString $keyPassphrase -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($User, $secKeyPassphrase)
Same when Keyfile has no password. Same when using "Set-SCPFile" which don't have this paramter "Path"... I'm sure the error occurs at this command and not anywhere else.
PoshSSH version 2.2 (Install with Install-Module -Name Posh-SSH) ; Local OS: W10 ; remote OS: Raspbian 9.9 ; PS version: 5.1.18362.145 build 10.0.18362.145 ; SSH version on remote device: Open SSH_7.4p1
can you try the new alpha version under releases