I am currently using this command. I am on another machine (ip1)
scp file.txt root@ip2:/home/praveen/test.c /home/praveen
The command will prompt for password.
I use it in some shell scripts, and am calling these scripts from some crontab files. So, I can not enter the password every time. Is there any way to disable password asking or some another way to input password from somewhere, so that I don't need to enter it again.
And I cannot use
ssh-keygen, because I have to do the actions for these scripts only. When I use
ssh-keygen, it will never prompt me for password again. I don't want this. Rest of the things should work as usual.