Knowledgebase

Portal Home > Knowledgebase > Articles Database > rsync password


rsync password




Posted by myserve, 12-04-2012, 05:17 AM
Hello, i want rsync some of my directory to a nas server but i have a problem when i create ssh public key on primary host and then paste it in remote host i can not login from remote host to local host anyway for thsi reason i decide find a way which give input to rsync , my command is : rsync /directoty1 user@1.2.3.4:/directoty1 how can i give "user" password to this command as in put , any help except ssh keygen? thanks,

Posted by net, 12-04-2012, 05:28 AM
Moved > Hosting Security and Technology.

Posted by Dan M, 12-04-2012, 05:29 AM
You could use a password file instead (--password-file).

Posted by myserve, 12-04-2012, 05:41 AM
can you tell me how can i use password file?

Posted by BestServerSupport, 12-04-2012, 07:36 AM
I am not 100% sure if it will work: 1. Create a password file in /root/passwd.txt 2. Run below command: rsync /directoty1 -ave 'ssh -p 1234' --password-file=/root/passwd.txt user@1.2.3.4:/directoty1

Posted by foobic, 12-04-2012, 07:41 AM
It's very difficult to automate the use of plain-text passwords with ssh (by design - the developers wanted to discourage it). While it is technically possible, you'll find it much easier to just get the ssh keys working, and you'll be more secure too.

Posted by whmcsguru, 12-04-2012, 01:48 PM
this ^^ Every time I use rsync, I use key based authentication. It's easier to setup, and it just works



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

Contact us