Posh-SSH
Posh-SSH copied to clipboard
Invalid path error when remote path contains an asterisk.
Working with Let's Encrypt wildcard certificates, the path contains an asterisk, which is valid on most Unix/Linux systems. Native SCP command handles this with using a backslash as the escape character.
Remote path: /home/user/.acme.sh/*.example.com/filename.cer
Command Line: $scpFile="/home/user/.acme.sh/*.example.com/filename.cer" Get-SCPItem -ComputerName $scpServer -Path $scpFile -Destination $(Get-Location).Path -Credential $scpCreds -PathType File -AcceptKey
SCP native equivalent scp [email protected]:/home/user/.acme.sh/*.example.com/filename.cer ./
Can this be permitted when PathType is File? Or better yet, replace the invalid character when downloading with an underscore?