首先假定有兩台Linux機器,linux1和linux2。 你想從linux1向linux2拷貝機器時無需輸入密碼,或者是在ctontab中這樣做。1. 安裝SSH2. 創建兩個用戶,user1在linux1上,user2吱在linux2上。3. On linux2, login as user2. dossh-keygen -P "" -trsa1 -f ~/.ssh/identity4. Copy key file to linux1scp /home/user2/.ssh/identity.pub user1@linux1:/home/user1/.ssh/authorized_keys5. Change file permissionchmod 600 /home/user2/.ssh/authorized_keys6. change ssh config file: /etc/ssh/ssh_configAdHost *ForwardX11 yesIdentityFile ~/.ssh/identityProtocol 17. Restart sshd8. login to linux1 as user1.9.Change file permissionchmod 600 /home/user1/.ssh/identity10. Restart sshdNow, you can ssh or secure copy filles by using user1 from linux1 to linux2 without prompt