On Thu September 3 2009 00:03:33 Daniel Stenberg wrote: > I like how this is turning, but unfortunately test 603 fails for me every > time now with this applied while it runs fine without it... > > I'll try to investigate a bit further soonish why it does this. > > (using libssh2 from an up-to-date git repo)
I would be happy to play with the test suite instead, but these tests are always skipped for me. Any idea why? Attached is output of: $ ./runtests.pl 603 > test603.out It's weird because I am able to start the server manually: $ ./sshserver.pl -v ssh server found /usr/sbin/sshd is OpenSSH 5.2.0 sftp server plugin found /usr/libexec/openssh/sftp-server sftp client found /usr/bin/sftp ssh keygen found /usr/bin/ssh-keygen ssh client found /usr/bin/ssh is OpenSSH 5.2.0 generating host keys... generating client keys... generating ssh server config file... generating ssh client known hosts file... generating ssh client config file... generating sftp client config file... generating sftp client commands file... SCP/SFTP server listening on port 8999 $ telnet 127.0.0.1 8999 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. SSH-2.0-OpenSSH_5.2 No chance for me to debug those scripts since I've never read/written a byte in perl :-( Kamil
********* System characteristics ******** * curl 7.19.6 (x86_64-unknown-linux-gnu) * libcurl/7.19.6 NSS/3.12.4.1 Beta zlib/1.2.3 libidn/1.9 libssh2/1.0 * Features: GSS-Negotiate IDN IPv6 Largefile SSL libz * Host: dhcp-lab-205.englab.brq.redhat.com * System: Linux dhcp-lab-205.englab.brq.redhat.com 2.6.29.5-191.fc11.x86_64 #1 SMP Tue Jun 16 23:23:21 EDT 2009 x86_64 GNU/Linux * Server SSL: ON * libcurl SSL: ON * debug build: OFF * track memory: OFF * valgrind: ON * HTTP IPv6 ON * FTP IPv6 ON * HTTP port: 8990 * FTP port: 8992 * FTP port 2: 8995 * FTPS port: 8993 * HTTPS port: 8991 * HTTP IPv6 port: 8994 * FTP IPv6 port: 8996 * TFTP port: 8997 * SCP/SFTP port: 8999 * SOCKS port: 9000 * SSL library: NSS * Libtool lib: OFF ***************************************** RUN: SFTP server failed verification === Start of file log/sftp.log debug2: ssh_connect: needpriv 0 debug1: Connecting to 127.0.0.1 [127.0.0.1] port 8999. debug2: fd 4 setting O_NONBLOCK debug1: fd 4 clearing O_NONBLOCK debug1: Connection established. debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type '-----END' debug1: identity file /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key type 2 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2 debug1: match: OpenSSH_5.2 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.2 debug2: fd 4 setting O_NONBLOCK debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5 debug1: kex: server->client aes128-ctr hmac-md5 none debug2: mac_setup: found hmac-md5 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 debug2: dh_gen_key: priv key bits set: 126/256 debug2: bits set: 1028/2048 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: checking without port identifier debug1: Host '127.0.0.1' is known and matches the DSA host key. debug1: Found key in /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_knownhosts:1 debug1: found matching key w/out port debug2: bits set: 1054/2048 debug1: ssh_dss_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key (0x7f4c7ea45d20) debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-dss blen 434 debug2: input_userauth_pk_ok: SHA1 fp 19:8c:ba:e3:95:84:9f:95:79:9d:67:da:b2:76:81:60:55:c4:09:bf debug1: read PEM private key done: type DSA debug1: Authentication succeeded (publickey). debug2: fd 5 setting O_NONBLOCK debug2: fd 7 setting O_NONBLOCK debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Requesting [email protected] debug1: Entering interactive session. debug1: channel 0: free: client-session, nchannels 1 debug1: fd 0 clearing O_NONBLOCK debug1: fd 2 clearing O_NONBLOCK Read from remote host 127.0.0.1: Connection reset by peer Transferred: sent 2368, received 2344 bytes, in 0.0 seconds Bytes per second: sent 94158.4, received 93204.1 debug1: Exit status -1 Couldn't read packet: Connection reset by peer === End of file log/sftp.log === Start of file curl_sftp_config # This is a generated file. Do not edit. # OpenSSH 5.2.0 sftp client configuration file for curl testing # Host * # Port 8999 HostName 127.0.0.1 User xdudka00 Protocol 2 # BindAddress 127.0.0.1 # IdentityFile /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key UserKnownHostsFile /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_knownhosts # BatchMode yes ChallengeResponseAuthentication no CheckHostIP no ClearAllForwardings yes Compression no ConnectionAttempts 3 ForwardAgent no ForwardX11 no GatewayPorts no GlobalKnownHostsFile /dev/null HostbasedAuthentication no KbdInteractiveAuthentication no LogLevel DEBUG2 NumberOfPasswordPrompts 0 PasswordAuthentication no PreferredAuthentications publickey PubkeyAuthentication yes RhostsRSAAuthentication no RSAAuthentication no StrictHostKeyChecking yes UsePrivilegedPort no # AddressFamily any ConnectTimeout 30 ControlMaster no ControlPath none EnableSSHKeysign no ExitOnForwardFailure yes ForwardX11Trusted no GSSAPIAuthentication no GSSAPIDelegateCredentials no HashKnownHosts no IdentitiesOnly yes NoHostAuthenticationForLocalhost no PermitLocalCommand no RekeyLimit 1G SendEnv ServerAliveCountMax 3 ServerAliveInterval 0 TCPKeepAlive no Tunnel no VerifyHostKeyDNS no # === End of file curl_sftp_config === Start of file log/sshd.log debug2: fd 3 setting O_NONBLOCK debug1: Bind to port 8999 on 127.0.0.1. Server listening on 127.0.0.1 port 8999. debug1: Forked child 17386. debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7 debug1: inetd sockets after dupping: 3, 3 Connection from 127.0.0.1 port 33794 debug1: Client protocol version 2.0; client software version OpenSSH_5.2 debug1: match: OpenSSH_5.2 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.2 debug2: fd 3 setting O_NONBLOCK debug1: list_hostkey_types: ssh-dss debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5 debug1: kex: client->server aes128-ctr hmac-md5 none debug2: mac_setup: found hmac-md5 debug1: kex: server->client aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received WARNING: /etc/ssh/moduli does not exist, using fixed modulus debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent debug2: dh_gen_key: priv key bits set: 133/256 debug2: bits set: 1054/2048 debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT debug2: bits set: 1028/2048 debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: KEX done debug1: userauth-request for user xdudka00 service ssh-connection method none debug1: attempt 0 failures 0 debug2: parse_server_config: config reprocess config len 1420 debug2: input_userauth_request: setting up authctxt for xdudka00 debug2: input_userauth_request: try method none Failed none for xdudka00 from 127.0.0.1 port 33794 ssh2 debug1: userauth-request for user xdudka00 service ssh-connection method publickey debug1: attempt 1 failures 0 debug2: input_userauth_request: try method publickey debug1: test whether pkalg/pkblob are acceptable debug1: temporarily_use_uid: 501/501 (e=501/501) debug1: trying public key file /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub debug1: fd 4 clearing O_NONBLOCK debug1: matching key found: file /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub, line 1 Found matching DSA key: 2e:b5:04:cc:d3:95:ec:51:76:1e:d4:a3:62:a5:cb:f3 debug1: restore_uid: (unprivileged) debug2: userauth_pubkey: authenticated 0 pkalg ssh-dss Postponed publickey for xdudka00 from 127.0.0.1 port 33794 ssh2 debug1: userauth-request for user xdudka00 service ssh-connection method publickey debug1: attempt 2 failures 0 debug2: input_userauth_request: try method publickey debug1: temporarily_use_uid: 501/501 (e=501/501) debug1: trying public key file /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub debug1: fd 4 clearing O_NONBLOCK debug1: matching key found: file /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub, line 1 Found matching DSA key: 2e:b5:04:cc:d3:95:ec:51:76:1e:d4:a3:62:a5:cb:f3 debug1: restore_uid: (unprivileged) debug1: ssh_dss_verify: signature correct debug2: userauth_pubkey: authenticated 1 pkalg ssh-dss Accepted publickey for xdudka00 from 127.0.0.1 port 33794 ssh2 debug1: SELinux support enabled ssh_selinux_getctxbyname: Failed to get default SELinux security context for xdudka00 Error sending audit message. ssh_selinux_setup_exec_context: SELinux failure. Aborting connection. debug1: do_cleanup === End of file log/sshd.log === Start of file curl_sshd_config # This is a generated file. Do not edit. # OpenSSH 5.2.0 sshd configuration file for curl testing # DenyUsers !xdudka00 AllowUsers xdudka00 DenyGroups AllowGroups # AuthorizedKeysFile /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub AuthorizedKeysFile2 /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_client_key.pub HostKey /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/curl_host_dsa_key PidFile /home/xdudka00/cvs/curl/devel/curl-7.19.6/tests/.ssh.pid # Port 8999 AddressFamily any ListenAddress 127.0.0.1 Protocol 2 # AllowTcpForwarding yes Banner none ChallengeResponseAuthentication no ClientAliveCountMax 3 ClientAliveInterval 0 GatewayPorts no HostbasedAuthentication no HostbasedUsesNameFromPacketOnly no IgnoreRhosts yes IgnoreUserKnownHosts yes KeyRegenerationInterval 0 LoginGraceTime 30 LogLevel DEBUG2 MaxStartups 5 PasswordAuthentication no PermitEmptyPasswords no PermitRootLogin no PrintLastLog no PrintMotd no PubkeyAuthentication yes RhostsRSAAuthentication no RSAAuthentication no ServerKeyBits 768 StrictModes no Subsystem sftp /usr/libexec/openssh/sftp-server SyslogFacility AUTH UseLogin no X11Forwarding no # KerberosAuthentication no KerberosOrLocalPasswd no KerberosTicketCleanup yes SkeyAuthentication no GSSAPIAuthentication no GSSAPICleanupCredentials yes # AcceptEnv Compression no KbdInteractiveAuthentication no KeepAlive no MaxAuthTries 10 PermitTunnel no PermitUserEnvironment no TCPKeepAlive no UseDNS no UsePAM no UsePrivilegeSeparation no X11UseLocalhost yes # === End of file curl_sshd_config test 603 SKIPPED: failed starting SSH server TESTFAIL: No tests were performed TESTDONE: 1 tests were considered during 2 seconds. TESTINFO: 1 tests were skipped due to these restraints: TESTINFO: "failed starting SSH server" 1 times (603)
