1

I am trying to copy some file via ssh with a SSH-RSA public key. I've already accepted the host key in my server and viceversa so the keys are synchronized. Now I try to connect via SSH to the host and I success, but it freezes if I invoque an "ls" in some folders. Also I try to do an scp request as follows:

scp -v username@host_ip:/folder/folder1/file.txt /home/user/Desktop

And I get this answer:

OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <ip_host> [<ip_host>] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: Host '<ip_host>' is known and matches the RSA host key.
debug1: ssh_rsa_verify: signature correct
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = fr_FR.UTF-8
debug1: Sending command: scp -v -f /folder/folder1/file.txt
Sending file modes: C0664 3352 file.txt
Sink: C0664 3352 file.txt
file.txt                                0%    0     0.0KB/s   --:-- ETA^
file.txt                                0%    0     0.0KB/s - stalled -^

I have searched and I have tried to change the MTU from 1500 to 1492 but nothing has changed. Does anyone have any clue of what could it happen? Thanks a lot.

  • 1
    Perform an fsck and check your system log for errors, e.g. disk media errors. – Sven Aug 26 '14 at 10:36
  • That. This looks to me very much like an error on the receiving system (inconsistent FS, NFS mount problems, or something else), and no amount of frotzing around with ssh options clientside will shed much light. If you aren't the admin on the remote system, get in touch with him/her and ask for assistance. – MadHatter Aug 26 '14 at 10:38
  • 1
    Yes, MTU was my first guess too. Why only try lowering it to 1492? How about trying a MTU at say 1200? – andol Aug 28 '14 at 18:07
  • Thankyou Andol, I lowered the value of the MTU to 1452 and it worked!! – Javier Suárez Aug 29 '14 at 8:23
2

The problem was solved by lowing the MTU from the default 1500 in my interface to a value under 1470.

To fix an MTU in a RHEL environment (which mine is):

Edit /etc/sysconfig/network-scripts/ifcfg-eth0:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Add MTU, settings:

MTU="1452"

Save and close the file. Restart networking:

# service network restart

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.