News:

SMF - Just Installed!

Main Menu

scp, sftp and fish hang in IPv4

Started by kalpana, Oct 20, 2023, 04:11 AM

Previous topic - Next topic

kalpana

I'm trying to copy a 200Mo file from one local machine to another and either it does not transfer anything or it transfers 64ko and hangs.
The setup:
both machine are running 22.04.3
the one getting the file is connected in wi-fi. (let's call it "desktop")
the one hosting the file is connected in ethernet (let's call it "server")

I'm not sure when it started being a problem. Both machines have the same sshd config (the default). I cannot see anything special in journalctl.

Various tests I have done:
  • If I try to change the MTU*on the source and target machine, it does not change anything.
  • I also tried to download from my Android phone and from a laptop with sftp using Ghost Commander, but I get the same symptoms. But the phone and the laptop can download from the desktop machine.
  • I used scp and sftp in command line, the integration of sftp in Dolphin/KDE and curl, without success.
  • I can list the files using sftp.
  • If I use IPv6, it works.
  • Same problem in the other way around (from ethernet machine to wi-fi machine).
  • Very small files work.
  • I tried to reboot both machines, it did not change anything.
  • I tried to use "scp -l 1" to limit the bitrate, same thing.
  • On the target machine, I*used "Subsystem sftp internal-sftp" in "/etc/ssh/sshd_config" but it did not change anything.
  • If I transfer the file with ssh it works:
Code:
ssh user@server cat /path-to/my-file > my-file
  • If tested local transfers on the two machines and it works.
  • I transferred using sftp over a ssh tunnel ( ssh -v fab@server -L 2222:localhost:22 -N) and it worked.
  • If I do a scp with "-v -v -v", the last thing I see are
Code:
Sink: C0644 227681801 toto.dat
toto.dat
cp: debug2: fd 7 setting O_NONBLOCK

  • With strace, I get a loop with

Code:
read(7, 0x5571d506e400, 16384) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=7, events=POLLIN}], 1, -1)    = ? ERESTART_RESTARTBLOCK (Interrupted by signal)

Any idea what it could be or what to look?