curl-library
Re: Transfering a file via SFTP returns error 51 ()
Date: Thu, 18 Jan 2018 11:02:51 +0100
Hi again,
I’ve made some tests with different versions with cURL, fortunately I also can provide the log of the SSH server, so here to you:
In this context
===
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
===
the operation fails with this log:
===
debug1: Forked child 30504.
debug1: Set /proc/self/oom_score_adj to 0
debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from 10.0.2.2 port 64398 on 10.0.2.15 port 22
debug1: Client protocol version 2.0; client software version libssh2_1.4.2
debug1: no match: libssh2_1.4.2
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: permanently_set_uid: 110/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: diffie-hellman-group14-sha1 [preauth]
debug1: kex: host key algorithm: ssh-rsa [preauth]
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: expecting SSH2_MSG_KEXDH_INIT [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: KEX done [preauth]
Received disconnect from 10.0.2.2 port 64398:11: Shutdown [preauth]
Disconnected from 10.0.2.2 port 64398 [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 30505
debug1: audit_event: unhandled event 12
===
In this other context:
===
curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP
===
It succeeds (as expected) with this log:
===
debug1: forked child 17554.
debug1: set /proc/self/oom_score_adj to 0
debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
debug1: inetd sockets after dupping: 3, 3
connection from 10.0.2.2 port 65332 on 10.0.2.15 port 22
debug1: client protocol version 2.0; client software version libssh2_1.4.3
debug1: no match: libssh2_1.4.3
debug1: enabling compatibility mode for protocol 2.0
debug1: local version string ssh-2.0-openssh_7.2p2 ubuntu-4ubuntu2.2
debug1: permanently_set_uid: 110/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: ssh2_msg_kexinit sent [preauth]
debug1: ssh2_msg_kexinit received [preauth]
debug1: kex: algorithm: diffie-hellman-group14-sha1 [preauth]
debug1: kex: host key algorithm: ssh-rsa [preauth]
debug1: kex: client->server cipher: aes128-ctr mac: hmac-sha1 compression: none [preauth]
debug1: kex: server->client cipher: aes128-ctr mac: hmac-sha1 compression: none [preauth]
debug1: expecting ssh2_msg_kexdh_init [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: ssh2_msg_newkeys sent [preauth]
debug1: expecting ssh2_msg_newkeys [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: ssh2_msg_newkeys received [preauth]
debug1: kex done [preauth]
debug1: userauth-request for user isanpaolo service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: user isanpaolo matched group list sftp_users at line 95
accepted none for isanpaolo from 10.0.2.2 port 65332 ssh2
debug1: monitor_child_preauth: isanpaolo has been authenticated by privileged process
debug1: monitor_read_log: child log fd closed
user child is on pid 17569
debug1: SELinux support disabled
debug1: do_cleanup
debug1: audit_event: unhandled event 12
===
In the first case everything seems ok until the disconnect, but I cannot notice any visible error before that point.
Any clue?
Thanks in advance.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-18