I need to do rsync by ssh and want to do it automatically without need of passing password for ssh manually.
相关问题
- How can I implement password recovery in an iPhone
- JavaScript File Transfer SSH
- How can I set the SVN password with Emacs 23.1 bui
- Why does this bash script work at console but fail
- Is the c++ hash function reasonably safe for passw
相关文章
- Check if directory exists on remote machine with s
- TeamCity Username / password
- Git Clone Fails: Server Certificate Verification F
- Test if File/Dir exists over SSH/Sudo in Python/Ba
- Can't access AWS CodeCommit with SSH
- Sanity check SSH public key? [closed]
- Spark EC2 SSH connection error SSH return code 255
- Use RSA with Eclipse Remote Systems Explorer?
I use a VBScript file for doing this on Windows platform, it servers me very well.
You should use a keyfile without passphrase for scripted ssh logins. This is obviously a security risk, take care that the keyfile itself is adequately secured.
Instructions for setting up passwordless ssh access
Though you've already implemented it by now,
you can also use any expect implementation (you'll find alternatives in Perl, Python: pexpect, paramiko, etc..)
I work out so
sshpass -p "password" rsync -ae "ssh -p remote_port_ssh" /local_dir remote_user@remote_host:/remote_dir
use a ssh key :
look at ssh-keygen and ssh-copy-id.
After that you can use an rsync this way :
the following works for me
I had to install
sshpass