Posh-SSH SCP Hangs if SCP is not available on remote system
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- cli, networking
Research direction
Start with the Set-SCPFile path and reproduce the upload against a remote *NIX host where scp is unavailable, using the command and timeout values shown. Done means the operation no longer hangs, reports the remote failure, and respects -OperationTimeout; verify that the same command completes when scp is restored.
Written by the indexing model from the issue text.
Description
Not all *NIX hosts come with SCP. We ran into this on a centos box, but there have been others. When SCP is not present on the remote system Posh-SSH SCP hangs. That said, SCP TO a remote device should not be dependant on and SCP client being available ON the remote device (as shown with the pscp example)
Putty fails to SCP, but Posh-SSH hangs if SCP is not available. Effect is shown in step 3 below.
- rename scp on remote system
[root@rhel-6-32 ~]# mv /usr/bin/scp /usr/bin/_scp
- show that putty can copy the file
C:\dev>\dev\pscp.exe -v -scp C:\dev\file.pub root@10.0.100.177:/tmp/test.pub
root@10.0.100.177's password:
Server sent command exit status 127
bash: scp: command not found
Fatal: Received unexpected end-of-file from server
- attempt to SCP the file with Posh-SSH
$SCP=Set-SCPFile -ComputerName $hostobject.computerName -Credential $credentialobject.credential -NoProgress -LocalFile $localFullPath -RemotePath "/tmp/"-Force:$Force -ConnectionTimeout 6 -OperationTimeout 10 -Verbose -Debug
write-host "Complete"
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: Fingerprint for 10.0.100.177: a2:ce:97:5a:10:7:98:83:d9:9c:6f:2a:fa:9f:2c:42
VERBOSE: Fingerprint matched trusted fingerprint for host 10.0.100.177
VERBOSE: Connection successful
VERBOSE: Uploading C:\dev\file.pub
^^^^ Just hangs there, but also -OperationTimeout appears to be ignored
- put scp back on the remote system
[root@rhel-6-32 ~]# mv /usr/bin/_scp /usr/bin/scp
- attempt to SCP the file again
$SCP=Set-SCPFile -ComputerName $hostobject.computerName -Credential $credentialobject.credential -NoProgress -LocalFile $localFullPath -RemotePath "/tmp/"-Force:$Force -ConnectionTimeout 6 -OperationTimeout 10 -Verbose -Debug
write-host "Complete"
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: Fingerprint for 10.0.100.177: a2:ce:97:5a:10:7:98:83:d9:9c:6f:2a:fa:9f:2c:42
VERBOSE: Fingerprint matched trusted fingerprint for host 10.0.100.177
VERBOSE: Connection successful
VERBOSE: Uploading C:\dev\file.pub
Complete
^^^ completed no problems
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
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.
More from darkoperator/Posh-SSH
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
darkoperator/Posh-SSH#626 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
darkoperator/Posh-SSH#625 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
darkoperator/Posh-SSH#623 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
darkoperator/Posh-SSH#621 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
darkoperator/Posh-SSH#617 · 2 comments ·
All issues in darkoperator/Posh-SSH
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AvengeMedia/DankMaterialShell#3523 ·
-
comp/cli comp/cron P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NousResearch/hermes-agent#117433 · 2 comments ·