• Seedbox
  • [Résolu] Acces FTP ou SFTP sur KODI impossible

Bonjour tout le monde,

J'ai réinstallé debian sur mon serveur pour avoir une installation propre en utilisant le script de Ex-Rat. Mais maintenant je n'arrive plus à accéder à mon serveur depuis Kodi. Il me dit qu'il n'arrive pas à se connecter. J'ai essayé avec le FTP et le SFTP.
Pourtant les deux protocoles fonctionnent avec FileZilla.

Quelqu'un aurait une idée ?

J'ai également un autre problème ^^ : lorsque j'essaye d’accéder à T411 via le proxy du serveur en activant Java Script, le serveur me banni ( sauf chez moi car mon ip est exclue ).

Merci pour votre aide

Cyprien

EDIT : voici le log KODI :
18:14:59 T:4160   ERROR: CCurlFile::Open failed with code 530 for ftp://USERNAME:PASSWORD@IPSERVEUR:PORT/
18:14:59 T:3096   ERROR: XFILE::CDirectory::GetDirectory - Error getting ftp://USERNAME:PASSWORD@IPSERVEUR:PORT/
18:14:59 T:3096   ERROR: CGUIDialogFileBrowser::GetDirectory(ftp://USERNAME:PASSWORD@IPSERVEUR:PORT/) failed
18:15:55 T:3096   ERROR: SFTPSession: Failed to connect 'kex error : did not find one of algos diffie-hellman-group1-sha1 in list diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 for kex algos'
18:15:55 T:3096   ERROR: SFTPSession: Not connected, can't list directory ''
18:15:55 T:3096   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@IPSERVEUR:PORT/
EDIT 2 : Lorsque je vais sur le lien ftp://monserveur et que je rentre mes IDs, il me les demande sans arrêt

EDIT 3 : Pour le blocage c'est port sentry qui ban pour le Port: 443 UDP Blocked. Mais pourquoi ?
Yo,

Le Script d' Ex. utilise vsftpd et une connexion ssl, KODi ne supporte pas encore le FTPs. Donc tu desactive la partie ssl dans la conf de vsftpd oubien tu install un 2eme serveur ftp qui n'utilise pas le ssl !

Pour ta connexion shell je voie pas dutout ce que a pourrait être sur filezilla t'arrive a te connecter en sftp ?
Flip wrote:Yo,

Le Script d' Ex. utilise vsftpd et une connexion ssl, KODi ne supporte pas encore le FTPs. Donc tu desactive la partie ssl dans la conf de vsftpd oubien tu install un 2eme serveur ftp qui n'utilise pas le ssl !

Pour ta connexion shell je voie pas dutout ce que a pourrait être sur filezilla t'arrive a te connecter en sftp ?
Oui merci je viens de voir quand désactivant le SSL, cela fonctionne. C'est vraiment gênant de désactiver le SSL ?

Je ne sais pas s'il bloque la connexion ssh mais lorsque j'utilise le proxy d'ex Rat pour aller sur t411 en activant les scripts, il me banne soit disant parce que j'ai scanné le port 443 ?
Je ne vois pas pourquoi
Pour le ftp, essai de mettre ftpes au lieu de ftp dans kodi.
xataz wrote:Pour le ftp, essai de mettre ftpes au lieu de ftp dans kodi.
Je ne l'ai pas : j'ai SSH/SFTP, HTTP, HTTPS, WebDAV,UPnP, NFS ....
Si tu as utilisé le script de ex_rat, tu devrais normalement avoir accès en sftp.
Autrement y'a toujours la solution de monter ton partage ftp à la main, avec ftpfs par exemple.
xataz wrote:Si tu as utilisé le script de ex_rat, tu devrais normalement avoir accès en sftp.
Autrement y'a toujours la solution de monter ton partage ftp à la main, avec ftpfs par exemple.
Oui cela fonctionne en SFTP mais uniquement avec FileZilla
Pour le sftp, tu as mis quoi comme remote path ?

Parce que de ce que je vois dans tes logs :
sftp://USERNAME:PASSWORD@IPSERVEUR:PORT/
Tu essaie de te connecté sur le /, alors qu'il faudrait ce connecté dans ton home (/home/username).
Oui je n'ai rien mis. Je pensais que ça redirigeait tout seul. (en ftp sans SSL pas besoin de rentrer le remote path en tout cas ) Je teste quand je rentre chez moi.

Merci
tu peut vérifier & poster le contenu de ce fichier ~/.kodi/userdata/sources.xml en prenant soin de remplacer passwd et iP

Stp
Flip wrote:tu peut vérifier & poster le contenu de ce fichier ~/.kodi/userdata/sources.xml en prenant soin de remplacer passwd et iP

Stp
voila :
 <video>
        <default pathversion="1"></default>
        <source>
            <name>Series</name>
            <path pathversion="1">ftp://user:pwd@domaine.tk:21/Media/Series/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Films</name>
            <path pathversion="1">ftp://user:pwd@domaine.tk:21/Media/Films/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>cyprien</name>
            <path pathversion="1">sftp://user:pwd@domaine.tk:monport/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
Les 2 premiers fonctionnent (en desactivant le certificat SSL) mais pas le dernier

EDIT : dans les logs c'est marqué login denied erreur 67
Il me semble qu'il faut le chemin absolu pour le sftp.
Dans le genre :
 <source>
            <name>cyprien</name>
            <path pathversion="1">sftp://user:pwd@domaine.tk:monport/home/cyprien</path>
            <allowsharing>true</allowsharing>
        </source>
xataz wrote:Il me semble qu'il faut le chemin absolu pour le sftp.
Dans le genre :
 <source>
            <name>cyprien</name>
            <path pathversion="1">sftp://user:pwd@domaine.tk:monport/home/cyprien</path>
            <allowsharing>true</allowsharing>
        </source>
ca ne fonctionne pas non plus je comprends pas ...
Salut
T'as regardé les log de kodi ? Tu t'es peut être fait bannir par portsentry ou fail2ban ? ça m'est déjà arrivé ! sinon ici tu pourras avoir une aide un peu plus "poussée"
attila01 wrote:Salut
T'as regardé les log de kodi ? Tu t'es peut être fait bannir par portsentry ou fail2ban ? ça m'est déjà arrivé ! sinon ici tu pourras avoir une aide un peu plus "poussée"
🙂
bah avec filezilla ca fonctionne donc c'est pas un ban si ?
ok je vais voir merci !
c'est louche ton histoire ... n'oublie pas de redémarrer kodi si tu modifie les fichier .xml
Ah j'ai trouvé une autre erreur :
16:04:41 T:4920   ERROR: SFTPSession: Failed to connect 'kex error : did not find one of algos diffie-hellman-group1-sha1 in list diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 for kex algos'
J'avais cette dernière erreur une fois.

dans /etc/ssh/sshd_config

après
 HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

J'avais du ajouter
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Ensuite relancer /etc/init.d/ssh restart

Au cas ou ca peut aider !
ca ne marche toujours pas :
16:24:42 T:3756   ERROR: SFTPSession: Failed to connect 'kex error : did not find one of algos diffie-hellman-group1-sha1 in list diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 for kex algos'
16:24:42 T:3756   ERROR: SFTPSession: Not connected, can't list directory 'home/cyprien/'
16:24:42 T:4688   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@media-serveur.tk:port/home/cyprien/
16:24:42 T:4688   ERROR: CGUIDialogFileBrowser::GetDirectory(sftp://USERNAME:PASSWORD@media-serveur.tk:port/home/cyprien/) failed
16:24:42 T:4468  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:09
16:24:53 T:4468   ERROR: SFTPSession: Not connected, can't list directory ''
16:24:53 T:4688   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@media-serveur.tk:port/
16:24:53 T:4688   ERROR: CGUIDialogFileBrowser::GetDirectory(sftp://USERNAME:PASSWORD@media-serveur.tk:port/) failed
16:24:55 T:2992   ERROR: SFTPSession: Not connected, can't list directory ''
16:24:55 T:4688   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@media-serveur.tk:port/
16:24:55 T:4688   ERROR: CGUIDialogFileBrowser::GetDirectory(sftp://USERNAME:PASSWORD@media-serveur.tk:port/) failed
16:24:56 T:4468   ERROR: SFTPSession: Not connected, can't list directory ''
16:24:56 T:4688   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@media-serveur.tk:558/
16:24:56 T:4688   ERROR: CGUIDialogFileBrowser::GetDirectory(sftp://USERNAME:PASSWORD@media-serveur.tk:port/) failed
16:25:30 T:4688   ERROR: SFTPSession: Not connected, can't list directory ''
16:25:30 T:4688   ERROR: XFILE::CDirectory::GetDirectory - Error getting sftp://USERNAME:PASSWORD@media-serveur.tk:port/
Mais j'ai pas ce que tu m'as indiqué dans le ssh config :
# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no
	
	KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
merci pour ton aide
Normal c'est le fichier ssh_config que tu as modifié

il faut l'ajouter sur sshd_config

essaye pour voir et redémarre ssh aussi
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1[/color]