1

I'm working on a project that parses servers to find websites hosted on them.

I'm using flysystem (which uses seclib) on a symfony 5 application. Works fine with 28 of the 29 servers I added, but one of them keeps failing with this error :

User notice: Expected SSH_FXP_VERSION

my code is straight from their documentation:

$filesystem = new Filesystem(new SftpAdapter(
    new SftpConnectionProvider(
        $this->server->getHost(), 
        $this->server->getUsername(),
        $this->server->getPassword(),
    ),
    '/', // root path
    PortableVisibilityConverter::fromArray([
        'file' => [
            'public' => 0640,
            'private' => 0604,
        ],
        'dir' => [
            'public' => 0740,
            'private' => 7604,
        ],
    ])
));

Any ideas ?

Thanks for your help !

UPDATE :

I can connect fine with fileZilla, here are the logs:

2022-06-30 14:29:35 2308 1 Statut : Connexion à sftp.sd3.gpaas.net…
2022-06-30 14:29:35 2308 1 Réponse : fzSftp started, protocol_version=11
2022-06-30 14:29:35 2308 1 Commande : open "XXX@sftp.sd3.gpaas.net" 22
2022-06-30 14:29:35 2308 1 Statut : Using username "XXX". 
2022-06-30 14:29:35 2308 1 Commande : Pass: ************************
2022-06-30 14:29:35 2308 1 Statut : Connected to sftp.sd3.gpaas.net
2022-06-30 14:29:49 2308 1 Statut : Récupération du contenu du dossier…
2022-06-30 14:29:49 2308 1 Commande : pwd
2022-06-30 14:29:49 2308 1 Réponse : Current directory is: "/"
2022-06-30 14:29:49 2308 1 Commande : ls
2022-06-30 14:29:49 2308 1 Statut : Listing directory /
2022-06-30 14:29:49 2308 1 Statut : Contenu du dossier « / » affiché avec succès

I changed from League/Flysystem to phpseclib, I now have a different error:

Expected NET_SFTP_VERSION. Got packet type:
Paul
  • 11
  • 5
  • @MartinPrikryl I updated the question to include logs, not sure if they are gonna be useful though.. Thanks for helping ! – Paul Jun 30 '22 at 12:34
  • @MartinPrikryl I switched to using phpseclib as said on the update. I triple checked details, they are correct. Yes, it is on the same machine, using the very same details.. – Paul Jul 01 '22 at 15:14

0 Answers0