hi there ,
i want to use the scp to transfer the file from one machine to another machine non-stop. i have put it in a .sh file. but everytime i run it and it prompts me to input password.
pc3@pc3-desktop:~/Documents$ ./sample3.sh
pc-main@192.168.1.117's password:
screenshot.jpg 100% 113KB 113.4KB/s 00:00
pc-main@192.168.1.117's password:
screenshot.jpg 100% 113KB 113.4KB/s 00:00
pc-main@192.168.1.117's password:
screenshot.jpg 100% 113KB 113.4KB/s 00:00
pc-main@192.168.1.117's password:
and this is my code :
sample3.sh
#!/bin/bash
for (( ; ; ))
do
scp /home/pc3/Desktop/javacode/screenshot.jpg pc-main@192.168.1.117:/home/pc-main/Documents
done
is there anyway to make it can keep transfer file without the need to keep input password ? thanks in advance for helping .