LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   RSYNC over SSH in Tomato/dd-wrt (https://www.linuxquestions.org/questions/linux-security-4/rsync-over-ssh-in-tomato-dd-wrt-4175606334/)

mackowiakp 05-20-2017 09:52 AM

RSYNC over SSH in Tomato/dd-wrt
 
I have installed Advanced Tomato ver 3.3-128 on my Asus RT-AC68R/U (ARMv7, 2 core). Additionally I have Entware installed too. This router is equipped with USBv3 port with 4 TB HDD connected. So I use this router as my home backup unit. I got possibility to backup this disk on distant server (different geographical location). But the only possibility to connect to this distant server is to use RSYNC over SSH with username/password authentication. No possibility to use only private/public keys because of administrator of this distant server. I can do it without problems manually, but I want to backup to distant location was done once a day automatically. The problem I have is to pass password to SSH during establishing connection. In "ordinary" Linux it would be possible to use sshpass command, but there is no such command ona my router. Both natively and in Entware as a extension to native list of commands. I am not to claver to compile sshpass from sources. Does anybody can help me automatize establishing connection to distant server over SSH?

HappyTux 05-20-2017 10:15 AM

Do the rsync command from the remote server you should be able to do it without a password needed for your router as you control that ssh install and its authorized_keys file. Of course this assumes you have a login on the remote machine to setup a daily cron job but I fail to see the point of having a backup you have no access too.

Edit: Could get tricky on the IP to connect to but I am sure I seen spot in my 56u where I could setup Dynamic DNS to have constant address to connect over the internet to it if I wanted to use that feature.

mackowiakp 05-20-2017 10:23 AM

I have no any login to remote machine, except rsync over ssh with user/pass authentication. I have no access to any shell, authorized_keys file etc. Administrator will not give me any other privileges because of agreement.

HappyTux 05-20-2017 04:49 PM

Quote:

Originally Posted by mackowiakp (Post 5713101)
I have no any login to remote machine, except rsync over ssh with user/pass authentication. I have no access to any shell, authorized_keys file etc. Administrator will not give me any other privileges because of agreement.

So you get a backup you cannot access if needed makes no sense to me at all, I have no other ideas in a situation like you are in.

michaelk 05-20-2017 05:24 PM

The dropbear client in Tomato might support the password environment variable. Its at least worth a try.

Code:

#the following requires dd-wrt v24 or later
DROPBEAR_PASSWORD='my password' ssh user@hostname

https://www.dd-wrt.com/wiki/index.php/SSH

mackowiakp 05-22-2017 10:34 AM

Quote:

Originally Posted by michaelk (Post 5713241)
The dropbear client in Tomato might support the password environment variable. Its at least worth a try.

Code:

#the following requires dd-wrt v24 or later
DROPBEAR_PASSWORD='my password' ssh user@hostname

https://www.dd-wrt.com/wiki/index.php/SSH

No, it does not work in Tomato


All times are GMT -5. The time now is 12:11 AM.