Kodi Community Forum
SSH Connection through addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: SSH Connection through addon (/showthread.php?tid=280676)



SSH Connection through addon - unreal - 2016-06-24

Hello Kodi,

So my goal is to have an addon with a button. And if you click it, a python script is executed that makes a ssh connection to another pi and executes a command.
(The addon is not really that, but for simplicity)
Here is my problem. My Idea was to have a python script that looks like this:

https://gist.github.com/bortzmeyer/1284249

The problem is that it ask for a ssh password. So I googled and the main answer was paramiko and others. Problem is I
cant install modules on openelec. Ive read somewhere( cant find the post) that you can import modules through os. But
if I import one modul. That modul has requirments that I need to import through os again. Which is kinda a bad solution.

Is there some addon that makes a ssh connection to something that i can study or do you people maybe have an alternative solution?

best regards

Sebastian


RE: SSH Connection through addon - nickr - 2016-06-24

You need to organise passwordless key based authentication. You don't need anything other then the built in ssh for that. There are many howtos found via google. Eg https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server or https://wiki.archlinux.org/index.php/SSH_keys


RE: SSH Connection through addon - unreal - 2016-06-24

(2016-06-24, 13:20)nickr Wrote: You need to organise passwordless key based authentication. You don't need anything other then the built in ssh for that. There are many howtos found via google. Eg https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server or https://wiki.archlinux.org/index.php/SSH_keys

I thought it was not possible because of open elecs read only directories. I'm gonna try it tomorrow. Thanks for the suggestion.


RE: SSH Connection through addon - nickr - 2016-06-24

/storage is read-write, and is root's home directory.