Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Set-SCPItem : Cannot process argument because the value of argument "path" is null

Open Inocious opened this issue 5 years ago • 1 comments

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

Inocious avatar Aug 13 '19 11:08 Inocious

can you try the new alpha version under releases

darkoperator avatar Jan 17 '20 02:01 darkoperator