LFTP: nome comum do certificado não corresponde ao nome do host solicitado

3

Usando lftp para carregar arquivos para um servidor remoto de dois computadores na minha rede. Usando exatamente o mesmo código, isso funciona bem em um e não funciona no outro. Transcrições de uma sessão com problema e uma sessão bem-sucedida são mostradas abaixo. O erro que recebo é:

Certificate verification: certificate common name doesn't match requested host name

Pesquisando este erro, encontra uma solução que parece funcionar para a maioria das pessoas (usando: set ssl:verify-certificate no ). Mas como você pode ver nas transcrições abaixo isso não funciona para o "computador problema".

Como os dois computadores usam o mesmo DNS e roteador para acessar a Internet, só posso presumir que isso pode ser causado por uma configuração diferente no computador com problema. Adoraria receber sugestões de itens para verificar além de lftp configurações.

O computador com problema

Stock Sistema Debian jessie 8.7: 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux

lftp versão sendo usada:

$ apt show lftp
Package: lftp
Version: 4.6.0-1+deb8u1
:
:

Sessão com falha (hostname substituído por "exemplo"):

$ lftp
lftp :~> debug
lftp :~> set
set dns:order "inet6 inet"
set file:charset UTF-8
set ftp:timezone ""
set net:max-retries 2
set net:timeout 30
set ssl:verify-certificate no
set xfer:log yes
set xfer:log-file /tmp/lftp.log
set xfer:max-log-size 1048576
set xfer:max-redirections 10
set xfer:verify-command /usr/share/lftp/verify-file
lftp :~> open example.nl
---- using user '[email protected]' and password from ~/.netrc
---- Resolving host address...
---- 2 addresses found: (▮▮▮▮▮▮▮▮, ▮▮▮▮▮▮▮▮)
lftp [email protected]@example.nl:~> dir
---- Connecting to example.nl (▮▮▮▮▮▮▮▮) port 21
**** connect(control_sock): Network is unreachable
---- Closing control socket
---- Connecting to example.nl (▮▮▮▮▮▮▮▮) port 21
<--- 220 ProFTPD 1.3.5b Server ready.
---> FEAT
<--- 211-Features:
<---  CCC
<---  PBSZ
<---  AUTH TLS
<---  MFF modify;UNIX.group;UNIX.mode;
<---  REST STREAM
<---  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
<---  LANG en-US.UTF-8*
<---  UTF8
<---  EPRT
<---  EPSV
<---  MDTM
<---  SSCN
<---  TVFS
<---  MFMT
<---  SIZE
<---  PROT
<--- 211 End
---> AUTH TLS
<--- 234 AUTH TLS successful
---> LANG
Certificate: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.zxcs.nl
 Issued by: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
WARNING: Certificate verification: Not trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘example.nl’
<--- 200 Using default language en_US.UTF-8
---> OPTS UTF8 ON
<--- 200 UTF8 set to on
---> OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
<--- 200 OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
---> USER [email protected]
<--- 331 Password required for [email protected]
---> PASS XXXX
<--- 230 User [email protected] logged in
---> PWD
<--- 257 "/" is the current directory
---> PBSZ 0
<--- 200 PBSZ 0 successful
---> PROT P
<--- 200 Protection set to Private
---> PASV
<--- 227 Entering Passive Mode (▮▮▮▮▮▮▮▮).
---- Connecting data socket to (▮▮▮▮▮▮▮▮) port 35302
---- Data connection established
---> LIST
<--- 150 Opening ASCII mode data connection for file list
Certificate: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.zxcs.nl
 Issued by: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
WARNING: Certificate verification: Not trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘ example.nl’
<--- 425 Unable to build data connection: Operation not permitted
---- Closing data socket
<--- 450 LIST: Operation not permitted
**** extra server response
ls: Fatal error: max-retries exceeded
lftp [email protected]@example.nl:/>

O outro computador

jessie Raspbian baseado em Debian 8.0: 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux Neste computador eu tenho exatamente a mesma versão de lftp :

$ apt show lftp
Package: lftp
Version: 4.6.0-1+deb8u1
:
:

Mas agora a sessão lftp não apresenta problemas:

$ lftp
lftp :~> debug
lftp :~> set
set dns:order "inet6 inet"
set file:charset UTF-8
set ftp:timezone ""
set net:max-retries 2
set net:timeout 30
set ssl:verify-certificate no
set xfer:log yes
set xfer:log-file /tmp/lftp.log
set xfer:max-log-size 1048576
set xfer:max-redirections 10
set xfer:verify-command /usr/share/lftp/verify-file
lftp :~> open example.nl
---- using user '[email protected]' and password from ~/.netrc
---- Resolving host address...
---- 2 addresses found: ▮▮▮▮▮▮▮▮, ▮▮▮▮▮▮▮▮
lftp [email protected]@example.nl:~> dir
---- Connecting to example.nl (▮▮▮▮▮▮▮▮) port 21
**** connect(control_sock): Network is unreachable
---- Closing control socket
---- Connecting to example.nl (▮▮▮▮▮▮▮▮) port 21
<--- 220 ProFTPD 1.3.5b Server ready.
---> FEAT
<--- 211-Features:
<---  CCC
<---  PBSZ
<---  AUTH TLS
<---  MFF modify;UNIX.group;UNIX.mode;
<---  REST STREAM
<---  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
<---  LANG en-US.UTF-8*
<---  UTF8
<---  EPRT
<---  EPSV
<---  MDTM
<---  SSCN
<---  TVFS
<---  MFMT
<---  SIZE
<---  PROT
<--- 211 End
---> AUTH TLS
<--- 234 AUTH TLS successful
---> LANG
Certificate: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.zxcs.nl
 Issued by: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
WARNING: Certificate verification: Not trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘example.nl’
<--- 200 Using default language en_US.UTF-8
---> OPTS UTF8 ON
<--- 200 UTF8 set to on
---> OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
<--- 200 OPTS MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;
---> USER [email protected]
<--- 331 Password required for [email protected]
---> PASS XXXX
<--- 230 User [email protected] logged in
---> PWD
<--- 257 "/" is the current directory
---> PBSZ 0
<--- 200 PBSZ 0 successful
---> PROT P
<--- 200 Protection set to Private
---> PASV
<--- 227 Entering Passive Mode (▮▮▮▮▮▮▮▮).
---- Connecting data socket to (▮▮▮▮▮▮▮▮) port 35035
---- Data connection established
---> LIST
<--- 150 Opening ASCII mode data connection for file list
Certificate: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.zxcs.nl
 Issued by: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
WARNING: Certificate verification: Not trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘example.nl’
---- Got EOF on data connection
---- Closing data socket
drwxr-xr-x  11 ftp      ftp          4096 Feb 11 16:56 .
drwxr-xr-x  11 ftp      ftp          4096 Feb 11 16:56 ..
drwxr-xr-x   2 ftp      ftp          4096 Dec 29 10:48 01.home
lftp [email protected]@example.nl:/>
    
por Mausy5043 27.02.2017 / 18:15

0 respostas