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: