darkoperator / darkoperator/Posh-SSH
Powershell: No such file or directory when download via SCP on switch Aruba 2530
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
good morning, everyone,
I'm building a script to upload or download aruba 2530 switch configurations with powershell.
here are the operations I performed:
I've hidden a few things, such as the switch's IP address and my user folder.
After filling in the following: $credential = Get-Credential
I manually enter the SSH login user and password
via WinSCP I can access the contents of the switch but via Posh-SSH I can't.
Do you have any leads to give me, I'm drying ^^
Thank you for all !
PS C:\Users\xxx> Import-Module Posh-SSH
PS C:\Users\xxx> $credential = Get-Credential
applet de commande Get-Credential à la position 1 du pipeline de la commande
Fournissez des valeurs pour les paramètres suivants :
PS C:\Users\xxx> Get-SCPFile -ComputerName "IP_Switch" -Credential $credential -RemoteFile "/cfg/running-config" -LocalFile "C:\Scripts\SwitchConfig.cfg" -AcceptKey -verbose
COMMENTAIRES : Using SSH Username and Password authentication for connection.
COMMENTAIRES : Fingerprint for IP_Switch: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
COMMENTAIRES : Fingerprint matched trusted fingerprint for host IP_Switch
COMMENTAIRES : Connection successful
COMMENTAIRES : Downloading /cfg/running-config
COMMENTAIRES : Saving as C:\Scripts\SwitchConfig.cfg
Get-SCPFile : scp: "/cfg/running-config": No such file or directory
Au caractère Ligne:1 : 1
- Get-SCPFile -ComputerName "IP_Switch" -Credential $credential -Re ...
-
+ CategoryInfo : OperationStopped: (Renci.SshNet.ScpClient:ScpClient) [Get-SCPFile], ScpException + FullyQualifiedErrorId : SSH.GetScpFile
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 with the reported Get-SCPFile command and compare the Aruba 2530 remote path and SCP behavior with the successful WinSCP session. No repository file or test is named; done would mean reproducing the failure and identifying whether the path or Posh-SSH handling needs correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100