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

Download via SSH/SCP hangs

Open StadtBadWurzach opened this issue 5 years ago • 9 comments

Hi, we use a powershell script to download *.gz files from a server. The server is hired on domainfactory. The tar file size is~ 1GB. I start the download with Get-SCPFile. After ~ 236MB the download stuck. I waited 3, 10, 25 minutes - nothing happens.

We are use Version 2.2 on our systems. I tried it under windows 7 and windows 10 - same issue. I started the download with -verbose -debug. But the output of this was not helpfully.

How can i get informations, why the download hangs on 236MB?

StadtBadWurzach avatar May 23 '20 11:05 StadtBadWurzach

No clue as to why it is stopping at that amount of data, could be many factors. Not enough memory on the host doing the download, netowork issue, problem with underlying library or a possible bug from the showing of progress. I am not able to replicate only side where I’m downloading 4Gb ISO files from a linux hosts. Could you disable the showing of progress and monitor if there is still traffic coming in from the host after a while? Same if with progress and looks stuck?

darkoperator avatar May 23 '20 13:05 darkoperator

The technical support of DomainFactory needs a debug/verbose log to help me. The guy referred as example to "ssh -vvv".

We use the same command/script at for a another Server at Hetzner - works fine. So the factors you mentioned had excluded.

I appended -NoProgress to the command and try it again -no luck. Download hangs after 236.656 KB. The connection still open. I can't delete the downloaded file and the firewall activity monitor show the session too.

StadtBadWurzach avatar May 23 '20 15:05 StadtBadWurzach

Wish the library I’m using would allow to get that info :( I would say if you can switch to SFTP while I find a way to replicate the issue. Do you know if they are using Linux, SSH.Com server, Windows OpenSSH ..etc? To see if I can setup a similar server?

darkoperator avatar May 23 '20 15:05 darkoperator

I can't imagine that DomainFactory tells me any Details of their System.

If you want, i will create a dedicated account at this server for you. Please send me a private message with your E-Mail address.

StadtBadWurzach avatar May 23 '20 16:05 StadtBadWurzach

sorry for the delay, been delivering training classes back to back. Let me compile a version of the new beta 0 of the next release and have you test that one to see if there was a fix. Sadly after looking at the code I simply call a method in a class to do the whole transfer, not much I can do from the Posh-SSH side.

darkoperator avatar Jun 01 '20 12:06 darkoperator

for reference https://github.com/darkoperator/Posh-SSH/blob/master/Source/PoshSSH/PoshSSH/GetScpFile.cs#L537 all of the other code is checking if a file exist or nor before downloading, check for a fingerprint and print progress.

darkoperator avatar Jun 01 '20 12:06 darkoperator

Can you test Beta 1? https://github.com/darkoperator/Posh-SSH/releases/tag/Beta1

darkoperator avatar Jun 01 '20 20:06 darkoperator

I installed the new version at windows server 2012R2 and windows 7 professional. Unfortunately the described problem still occurs.

StadtBadWurzach avatar Jun 06 '20 11:06 StadtBadWurzach

Pass me the info to test from side to carlos_perez[at]darkoperator.com

darkoperator avatar Jun 06 '20 12:06 darkoperator