Howto Rsync over SSH without a password.
1. Log into the TARGET host, and generate an RSA (public and private) key pair:
* Accept the default location for the key files (press [ENTER]).
* Enter and confirm a pass phrase. (empty for no passphrase) (it is not a requirement)
target$ ssh-keygen -t rsa
2. Log into the SOURCE host:
source$ touch ~/.ssh/authorized_keys
3. Log into the SOURCE host, and get public key from TARGET:
source$ ssh target cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
4. Log into the TARGET host, and try to rsync:
target$ rsync -e ssh -av oracle@source:/ocfs_data/mxdell/arch/ /ocfs_data/mxdell/arch/
或
命令1:$ ssh-keygen -t rsa
命令2:$ scp /home/use/.ssh/id_isa.pub B:/home/user/.ssh/authorized_keys
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/110321/viewspace-683708/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/110321/viewspace-683708/
SSH免密Rsync实践
本文详细介绍如何通过SSH实现Rsync免密码传输的过程。具体步骤包括:在目标主机上生成RSA密钥对;将公钥从目标主机复制到源主机的authorized_keys文件中;最后在目标主机上使用rsync命令进行无密码同步。
469

被折叠的 条评论
为什么被折叠?



