Win Windows key based ssh
#1
I have some media files stored on a linux server that I can only access over ssh. I want to add the server as a media source via Kodi's ssh/sftp support using keys. On a linux machine, this works perfectly. But when I try it from my windows 10 machine it seems like it's trying to load the public key to do authentication, when it needs to be loading the private key. I have uploaded the log to https://pastebin.com/WRaGvUmZ , but I think the pertinent line is "ERROR: SFTPSession: Failed to authenticate via publickey 'Failed to import public key: C:\Users\*****/.ssh/id_rsa.pub'"

Why is it trying to use the public key file for authorization? If I remove that file it doesn't try to use the id_rsa file that contains the private key which I have in the same folder. Is there some specific naming convention I need to use, or is there a different problem?
Reply
#2
If memory serves ssh_userauth_publickey_auto() which is used by Kodi requires both keys.
It asks the server - Would this work? by using public key first, if server accepts it - private key is sent over to complete the process.
Make sure sure you have the keypair in good shape and readable by Kodi.

Edit: public key contains username, which otherwise wouldn't be known, and ssh server requires a username, thats why its needed.
Reply
#3
If you want to connect to a server using SFTP from Kodi on a Windows machine, make sure that both files id_rsa and id_rsa.pub are present in the folder .ssh in your home directory. If you still get the error Failed to import public key then verify that your id_rsa.pub file uses LF instead of CRLF line endings. Kodi only seems to accept the file if it uses LF line endings.
Reply
#4
(2018-02-20, 16:35)Fabianius Wrote: If you want to connect to a server using SFTP from Kodi on a Windows machine, make sure that both files id_rsa and id_rsa.pub are present in the folder .ssh in your home directory. If you still get the error Failed to import public key then verify that your id_rsa.pub file uses LF instead of CRLF line endings. Kodi only seems to accept the file if it uses LF line endings.

I am currently myself looking into installing a SFTP server on a Windows 10 machine. Requirements are >4 Gb files, runs as a system service and able to do virtual directories. What STPF server program would be recommendable on Windows 10 to serve Kodi both at home and at work via WAN?
Reply

Logout Mark Read Team Forum Stats Members Help
Windows key based ssh0