Sync between two receivers with scp

There is 1 reply in this Thread which was already clicked 636 times. The last Post () by gadio.

  • First you need to install this packages on both receivers :


    Code
     opkg install openssh-keygen openssh-ssh openssh-scp


    (openssh-keygen is needed only on the receiver from which will be copied files)


    Then you have to create ssh-key


    Code
    ssh-keygen

    just press enter every time system asking you and at the end you have to see something like this:



    Now you have to copy this key to the other receiver with this command (just replace dest.stb.ip with the ip of the receiver which you will copy the key):


    Quote


    cat ~/.ssh/id_rsa.pub | ssh root@dest.stb.ip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"


    You'll be asked to enter the root password on the other receiver. And that's it. Now you can copy things between the receivers with scp command, like picons, bouqetlist, lamedb and etc. You can automate this with a crontab manager.


    For example to copy picons between the receivers, just type (replace dest.stp.ip with the ip of the receiver you'll copy the picons):


    Quote


    scp /usr/share/enigma2/picon/*.png root@dest.stb.ip:/usr/share/enigma2/picon/

    The path to the picons folder may be different, you can find it with this command:


    Quote


    find / -name picon


    I personally use it to receive the ip address form one of the receivers to the other with this script, putted on crontab to send it daily:


    Bash
    #!/bin/bash
    
    wget http://ipecho.net/plain -O - -q  > osninoip.txt ;
    
    scp /home/root/osninoip.txt root@dest.stb.ip:/home/root/osninoip.txt

    Edited once, last by gadio ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!