Category Archives: Other tech

Troubleshooting Kodi — “Couldn’t connect to network server.”

Published / by Andrew

I just had an aggravating experience with using Kodi over my home network. I thought I’d go ahead and post it here in case anyone else is having the same problem, and also to cement it into my brain in case I have this problem again.

I have my music hosted on my desktop computer (which is increasingly more and more of a server machine, as I only use it via SSH from my laptop in my living room), and I set up Kodi to connect to the directory through SSH. From two different devices, I’m getting the same message: “Couldn’t connect to network server.”

These devices are a laptop and an Android phone. The cause of the problem turned out to be the same in both (at least, I think), but Kodi has a horrible problem in not explaining why it couldn’t connect to the network server, making debugging really irritating. The problem is that I had reinstalled the OS on the server machine, so the SSH verification keys were different. SSH was rejecting the connect as a security measure.

While the problem was the same for both devices, the solution was really different for each.

For the laptop, I only removed the offending key. It wasn’t a big deal– I just tried to SSH to my desktop from the laptop, and it gave me the instructions. Then I needed to restart Kodi, and everything worked fine.

My phone is a different story. The convenient tools for SSH just aren’t available here, and I don’t have any idea how to remove the bad key here. I actually just did the scorched earth option– I went to the app’s options, went to the Storage section and taped “Clear storage”. That removed all settings, all add ons, everything. Not too big a deal for me, personally, because I don’t use Kodi for much on my phone. But it removed the bad key.

There is also an additional problem with the Android version in that it does not support SSH/SFTP natively. I had to go to the Addons repository and install something to get SSH support.

From there, everything is finally back to normal.

On the off-chance that the Kodi team is reading this– Please give better error messages with network problems.