0

i need to trasfer files from my mac os to an ubuntu server on a VPN. I can ssh into it but when i try to use scp to send files (of every size), the transfer gets stalled.

this is the stack trace of the error. I can SCP from another client, so i think is something related to my system

scp -vvv -l 1000 target/file.jar [email protected]:/home/assist
Executing: program /usr/local/Cellar/openssh/7.9p1/bin/ssh host 99.0.0.85, user assist, command scp -v -t /home/assist
OpenSSH_7.9p1, OpenSSL 1.0.2p  14 Aug 2018
debug1: Reading configuration data /Users/mario/.ssh/config
debug1: /Users/mario/.ssh/config line 7: Applying options for 99.0.0.*
debug3: kex names ok: [ecdh-sha2-nistp521]
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 99.0.0.85 is address
debug2: ssh_connect_direct
debug1: Connecting to 99.0.0.85 [99.0.0.85] port 22.
debug1: Connection established.
debug1: identity file /Users/mario/.ssh/id_rsa type 0
debug1: identity file /Users/mario/.ssh/id_rsa-cert type -1
debug1: identity file /Users/mario/.ssh/id_dsa type -1
debug1: identity file /Users/mario/.ssh/id_dsa-cert type -1
debug1: identity file /Users/mario/.ssh/id_ecdsa type -1
debug1: identity file /Users/mario/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/mario/.ssh/id_ed25519 type -1
debug1: identity file /Users/mario/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/mario/.ssh/id_xmss type -1
debug1: identity file /Users/mario/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 99.0.0.85:22 as 'assist'
debug3: hostkeys_foreach: reading file "/Users/mario/.ssh/known_hosts"
debug3: hostkeys_foreach: reading file "/Users/mario/.ssh/known_hosts2"
debug3: record_hostkey: found key type ECDSA in file /Users/mario/.ssh/known_hosts2:70
debug3: load_hostkeys: loaded 1 keys from 99.0.0.85
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: ecdh-sha2-nistp521,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: ecdh-sha2-nistp521
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:6tpm0O5MKcH7nTsKuZx1K2466BM9S9VBIuTqYdiB2ng
debug3: hostkeys_foreach: reading file "/Users/mario/.ssh/known_hosts"
debug3: hostkeys_foreach: reading file "/Users/mario/.ssh/known_hosts2"
debug3: record_hostkey: found key type ECDSA in file /Users/mario/.ssh/known_hosts2:70
debug3: load_hostkeys: loaded 1 keys from 99.0.0.85
debug1: Host '99.0.0.85' is known and matches the ECDSA host key.
debug1: Found key in /Users/mario/.ssh/known_hosts2:70
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: Will attempt key: /Users/mario/.ssh/id_rsa RSA SHA256:M1Jh1ocVSjwoOSK1so1j+N8rabbKiPV0WNti4NdtCX4
debug1: Will attempt key: /Users/mario/.ssh/id_dsa 
debug1: Will attempt key: /Users/mario/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/mario/.ssh/id_ed25519 
debug1: Will attempt key: /Users/mario/.ssh/id_xmss 
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/mario/.ssh/id_rsa RSA SHA256:M1Jh1ocVSjwoOSK1so1j+N8rabbKiPV0WNti4NdtCX4
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: /Users/mario/.ssh/id_rsa RSA SHA256:M1Jh1ocVSjwoOSK1so1j+N8rabbKiPV0WNti4NdtCX4
debug3: sign_and_send_pubkey: RSA SHA256:M1Jh1ocVSjwoOSK1so1j+N8rabbKiPV0WNti4NdtCX4
debug3: sign_and_send_pubkey: signing using rsa-sha2-512
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to 99.0.0.85 ([99.0.0.85]:22).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x20
debug2: client_session2_setup: id 0
debug1: Sending command: scp -v -t /home/assist
debug2: channel 0: request exec confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
Sending file modes: C0744 40427054 emanager.jar
debug2: channel 0: rcvd ext data 34
Sink: C0744 40427054 emanager.jar
debug2: channel 0: written 34 to efd 6
file.jar                                                                                                    

5% 2112KB 122.3KB/s - stalled -

debug3: send packet: type 1

If i log into the server and put ssh logs to VERBOSE i can just see in /var/log/auth.log

Nov 18 17:23:13 MiddlewareLayer sshd[32565]: Accepted publickey for assist from xxx.xxx.xxx.xxx port 54490 ssh2: RSA SHA256:M1Jh1ocVSjwoOSK1so1j+N8rabbKiPV0WNti4NdtCX4
Nov 18 17:23:13 MiddlewareLayer sshd[32565]: pam_unix(sshd:session): session opened for user assist by (uid=0)
Nov 18 17:23:13 MiddlewareLayer systemd-logind[1044]: New session 258796 of user assist.

and nothing more... I was able to connect to it some week ago, nothing should have changed from then

I restarted ssh with full debug... everything seems to go well

it blocks at

Starting session: command for assist from 172.78.78.172 port 54959 id 0
debug3: mm_audit_run_command entering command scp -t /home/assist
debug3: mm_request_send entering: type 113
debug3: mm_request_receive entering
debug3: monitor_read: checking request 113
debug3: mm_answer_audit_command entering
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x08
debug2: fd 10 setting O_NONBLOCK
debug2: fd 9 setting O_NONBLOCK
debug2: fd 12 setting O_NONBLOCK
debug3: send packet: type 99
debug2: channel 0: read 121 from efd 12
debug2: channel 0: rwin 2097152 elen 121 euse 1
debug2: channel 0: sent ext data 121
debug2: channel 0: read 44 from efd 12
debug2: channel 0: rwin 2097031 elen 44 euse 1
debug2: channel 0: sent ext data 44
debug2: channel 0: read 307 from efd 12
debug2: channel 0: rwin 2096987 elen 307 euse 1
debug2: channel 0: sent ext data 307

This is when i get the "stalled" on the transfer...

8
  • Hi @besmart! I would say it has to be most likely a server error, rather than client, that is why you may not find the error on the client logs. Why don't you pull the server logs and post it here? Thanks Nov 17, 2018 at 18:07
  • thanks @JorgeValentini i edited the question but it looks like there is not so much in logs...
    – MarioC
    Nov 18, 2018 at 16:27
  • Try to put the SSH in debug mode on the server (sudo /usr/sbin/sshd -p 222 -D -ddd -e), note that you can use port 22 if you want but you will have to first kill the daemon. With this level of detail you should be able to spot any errors there. Remember to point the scp to the new port chosen. Nov 18, 2018 at 17:10
  • unfortunately i cannot connect to port 222 via ssh/scp because there are closed and i cannot open them (the server is not mine..) I restarted ssh on port 22 and edited the post, thanks
    – MarioC
    Nov 18, 2018 at 17:49
  • How about SFTP? does it work? can you connect with the user assist? list directories, get files, put files? can you try to send your file through SFTP with sftp [email protected]:/home/assist <<< $'put target/file.jar'? Nov 18, 2018 at 19:11

0

You must log in to answer this question.

Browse other questions tagged .