-1

I have a problem with rsync over SSH. I mean the way of entering a password. I can't enter it immediately after entering the line:

$ rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/ 

and i have no idea how to do it. Any ideas?

Cheslav
  • 91
  • 7
  • what has this to do with python or pyqt? either remove the tags, or please explain what exactly you're trying to do. – mata May 26 '13 at 20:57
  • Is the problem you don't want to have your password in plain text in the script, or the mechanics of the python shell interface? – John b May 26 '13 at 20:58
  • They made it hard to do what you want because it's a bad (insecure) idea. – msw May 26 '13 at 21:08
  • I am going to take a guess, and say use SSH keys. – John b May 26 '13 at 21:22

1 Answers1

2

Put

eval  `keychain --eval id_rsa`  #Or  id_dsa / whatever you key is called

In your .bash_profile and log in to a terminal some ware. (Or you could just run it plain)

Then stick it in you script (you will have to run it onesome ware else as stated before unless your script is interactive)

You will need to install keychain and read a tutorial on making keys with ssh-keygen beforehand.

This is a rough answer for a rough question.

sabgenton
  • 1,823
  • 1
  • 12
  • 20