r/kodi•
DaHealey

Kodi on firestick can't connect to sftp server

I loaded Kodi 20.x on my firestick 4k - all seems to be ok. I also have Kodi loaded on a raspberryPi in another room - the raspberryPi has a sftp server enabled to load videos to its large attached HDD.

I want to have the firestick read the sftp server for a single video repo. However when trying to setup a new source in Kodi as the sftp server, it keeps failing.

I've verified this sftp server works, use it from other computers successfully. Both the firestick and raspberryPi are on the same subnet in my house. They can ping.

Any idea what's wrong?

Posted Nov 22, 2023, 8:33 PM UTC

28
teatowl66•

Use smb. Mysql server works well on raspberrypi. Paths must be smb for it to work. You can access the same kodi database including watched status from any device on your network. Flawless and super easy to skodi wiki mysql

2
DaHealeyOP•

thank you for the suggestion, I'll try that out.

1
LNMagic•

Smb can be a little tricky to setup on Linux sometimes. I ended up needing 3 or 4 XML files to get everything running properly, but now it's pretty good.

If you hit a snag, let me know here.

Also, every device should run the same version of Kodi if possible. They don't always get updates at the same time.

1
gnarlybitchh•

sounds like a potential issue with the firestick's access to the sftp server. make sure the firestick has proper permissions and check for any firewall or network configuration that might be blocking the connection. also, ensure both devices are running the same version of Kodi. keep us posted on your progress!

1
rtheron•

Ftp is not the way

1
DaHealeyOP•

Yeah, I realized that after thinking about it for a bit (even if I could get it to connect).

I setup a samba server on my Pi and the firestick has no problem mapping a samba drive to the Pi. All works great.

I started doing the sql install, but it looks like I need to transfer config files back and forth which I'd rather not get into.

1
rtheron•

It's less secure but I prefer nfs share with specific hosts only

1
BohemianCyberpunk•

IIRC SFTP requires an additional plugin (from the default repo).

1

could be a compatibility issue, check your firewall setting

1
RidingContigo•

did you get this sorted? I'm trying to do the same thing right now. Kodi 20 running on FireTV. added the SFTP add-on, add my SFTP server using user/pass, and it just says failed to connect.

1
DaHealeyOP•

Eh. Sorta. I switched to smb. I enabled smb on my server and now kodi on the firetv talks to it perfectly.

1
RidingContigo•

thanks, not the answer I was hoping for, but glad you got something working. I can't enable SMB where I'm at. I have SSHFS running on a Raspberry Pi and kodi pulling that, but I need to repurpose my Pi's in favor of Fire TV 4Ks. I'm so close I can taste it... just can't figure out a way to connect via SFTP

1
RidingContigo•

TL;DR: on your sshd server, you need this in the sshd_config:

PasswordAuthentication yes

AuthenticationMethods password

note: NOT AuthenticationMethods keyboard-interactive !!!!

​

WELL I think I may have made progress. I have a Debian VM where I installed Kodi and was able to get a better look at the debug logs from both sides. On my SSH server I had a special Match Group setup just for my kodi user so that I could bypass my otherwise required OTP auth (I do this for my other kodi instances running on Pi's). Since the SFTP add-on doesn't yet support shared key auth, I created a new user with a password. Tested working fine connecting from WinSCP. However, I noticed this in the kodi add-on log:

2023-11-30 22:47:47.832 T:8182 info <general>: AddOnLog: vfs.sftp: SFTPSession: Creating new session on host '192.168.1.1:22' with user 'kodi'

2023-11-30 22:47:47.947 T:8182 error <general>: AddOnLog: vfs.sftp: SFTPSession: Password present, but server does not support password authentication

2023-11-30 22:47:47.948 T:8182 error <general>: AddOnLog: vfs.sftp: SFTPSession: No authentication method successful

2023-11-30 22:47:47.948 T:8182 error <general>: AddOnLog: vfs.sftp: SFTPSession: Not connected, can't list directory ''

2023-11-30 22:47:47.948 T:8182 error <general>: GetDirectory - Error getting sftp://USERNAME:[email protected]:22/

got me thinking that's weird, because I don't even see an auth attempt in the SSHD log, but maybe it doesn't rise to the level of logging I have. Dug thru the manpage for SSHD and sure enough, they distinguish between "password" and "keyboard-interactive". swapped those out, et voi la! I can connect from my Fire TV, thru Kodi, using the SFTP addon, to a debian server running SSH.

I haven't done a lot of testing to make sure it all works 100% yet but at least I can see my file list. Happy to answer any questions or test some things out if you're curious.

1