Find the answer to your Linux question:
Results 1 to 8 of 8
I want to copy a file to a remote machine but the scp got stuck although it shows "100% 63KB 62.9KB/s 00:00" the file actually hasnt been transferred but if ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    87

    scp got stuck although it shows "100%"


    I want to copy a file to a remote machine
    but the scp got stuck
    although it shows "100% 63KB 62.9KB/s 00:00"
    the file actually hasnt been transferred
    but if I transfer another file, it is OK
    this file is not big, just 65KB
    and only a txt file with many lines
    what is wrong with this?


    Code:
    [esolve@goeland url_folder]$ scp -v urls.list esolve@138.96.201.109:/user/esolve/home/tor/url_folder
    Executing: program /usr/bin/ssh host 138.96.201.109, user esolve, command scp -v -t -- /user/esolve/home/tor/url_folder
    OpenSSH_5.8p2, OpenSSL 1.0.0j-fips 10 May 2012
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to 138.96.201.109 [138.96.201.109] port 22.
    debug1: Connection established.
    debug1: identity file /user/esolve/home/.ssh/id_rsa type -1
    debug1: identity file /user/esolve/home/.ssh/id_rsa-cert type -1
    debug1: identity file /user/esolve/home/.ssh/id_dsa type -1
    debug1: identity file /user/esolve/home/.ssh/id_dsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
    debug1: match: OpenSSH_5.8 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_5.8
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA 7d:3c:28:16:b6:ea:3e:4e:1e:a0:a3:a9:06:c1:5d:47
    debug1: Host '138.96.201.109' is known and matches the RSA host key.
    debug1: Found key in /user/esolve/home/.ssh/known_hosts:1
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
    debug1: Next authentication method: gssapi-keyex
    debug1: No valid Key exchange context
    debug1: Next authentication method: gssapi-with-mic
    debug1: Unspecified GSS failure.  Minor code may provide more information
    Credentials cache file '/tmp/krb5cc_40078' not found
    
    debug1: Unspecified GSS failure.  Minor code may provide more information
    Credentials cache file '/tmp/krb5cc_40078' not found
    
    debug1: Unspecified GSS failure.  Minor code may provide more information
    
    
    debug1: Unspecified GSS failure.  Minor code may provide more information
    
    
    debug1: Next authentication method: publickey
    debug1: Trying private key: /user/esolve/home/.ssh/id_rsa
    debug1: Trying private key: /user/esolve/home/.ssh/id_dsa
    debug1: Next authentication method: password
    esolve@138.96.201.109's password:
    debug1: Authentication succeeded (password).
    Authenticated to 138.96.201.109 ([138.96.201.109]:22).
    debug1: channel 0: new [client-session]
    debug1: Requesting no-more-sessions@openssh.com
    debug1: Entering interactive session.
    debug1: Sending environment.
    debug1: Sending env XMODIFIERS = @im=ibus
    debug1: Sending env LANG = en_US.UTF-8
    debug1: Sending command: scp -v -t -- /user/esolve/home/tor/url_folder
    Sending file modes: C0777 64392 urls.list
    Sink: C0777 64392 urls.list
    urls.list                                     100%   63KB  62.9KB/s   00:00

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    Does sftp exhibit the same problem?

    anything in your messages log on the remote side?

    have you tried adding another -v to scp? (e.g., scp -v -v )

    you can try a strace, too, e.g.:

    Code:
    strace scp file user@blah...

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by astrognome View Post
    It does not look like you are telling scp where to copy the file to. If you want the file to be copied into the the directory that you are currently in, give this a go:

    scp -v urls.list esolve@138.96.201.109:/user/esolve/home/tor/url_folder .

    Note: the space then the period at the end of the string.
    No, that's not right. You are thinking of scping something locally, I think. the OP's command now will copy "urls.list" to the dir "/user/esolve/home/tor/url_folder" (or to a file of that same name, if the dir "url_folder" does not exist. or it will fail outright if the parent dir does not exist.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2012
    Posts
    26
    Right you are atreyu, I noticed that after I posted. Mea Culpa.

  6. #5
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hey no worries, and by the way - Hello and Welcome!

  7. #6
    Just Joined!
    Join Date
    Oct 2012
    Posts
    26
    Thank you!

  8. #7
    Just Joined!
    Join Date
    May 2012
    Posts
    87
    I modified the MTU on both machines to 576
    and then it works fine

  9. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by esolve View Post
    I modified the MTU on both machines to 576
    and then it works fine
    Excellent, thanks for posting your solution.

    Marking as solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •