
Estoy intentando conectarme a un sitio asociado desde el servidor Ubuntu a través de ftp usando curl. El comando lo da el socio comercial.
curl -v -kG --ftp-method nocwd --ftp-ssl -cert "domainname.crt" --key "domainname.key" -u user:password ftp://ftp.partner.biz/
Recibo el siguiente error.
* Could not resolve host: domainname.crt
* Closing connection 0
curl: (6) Could not resolve host: domainname.crt
* Trying <ipaddr>:21...
* TCP_NODELAY set
* Connected to ftp.partner.biz (<ipaddr>) port 21 (#1)
< 220 (<partnername>)
> AUTH SSL
< 504 unknown security mechanism
> AUTH TLS
< 234 AUTH TLS OK starting TLS negotiation
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS alert, handshake failure (552):
* error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
* Closing connection 1
Veo los puertos 22 y 443 escuchando en mi servidor
tcp6 0 0 :::22 :::* LISTEN 1570/sshd: /usr/sbi
tcp6 0 0 :::443 :::* LISTEN 5802/apache2
El socio dice que no hay ningún registro de errores de su parte. ¿Tiene algo que ver con tcp6 o algo más? No puedo cambiar el formato del comando porque el socio dice que funciona con sus otros clientes. Soy impotente. ¿Alguien puede decirme qué está mal?
Respuesta1
curl
se queja de que no puede acceder a "domainname.crt" porque no conoce la dirección IP de este nombre de host y muestra el siguiente mensaje mencionado en su pregunta.
* Could not resolve host: domainname.crt
* Closing connection 0
curl: (6) Could not resolve host: domainname.crt
Es de suponer que no tiene intención de conectarse a algún sitio llamado "nombredominio.crt"; Lo más probable es que sea el nombre del archivo de su certificado almacenado en algún lugar de su máquina cliente. Por favor, vuelva a verificar su curl
comando. En lugar de su comando original, debería ser
curl -v -kG --ftp-method nocwd --ftp-ssl --cert "domainname.crt" --key "domainname.key" -u user:password ftp://ftp.partner.biz/
Supongo que te perdiste un guión en --cert
el argumento.
Respuesta2
Tienes un pequeño error en el comando. El texto:
-cert "domainname.crt"
debe ser
--cert "domainname.crt"