I am trying to use scp to tranfer files from server a to server b. In the GUI, the user selects the file to transfer, specifies the remote server name, and enters their unix username and password. How do I code this in Perl so that the scp command is executed at the command line followed by the user's password? I also need logic that if the user enters in the wrong password that an error message will be thrown.
Here is the scp command that I run to do this:
scp $filename $login_name@$target_server:$directory
Here is the pseudocode:
if (correct login/password for the target_server){
scp filename to target_server's specified directory
enter password for user
} else {
login/password for target_server incorrect
)
Thanks,
Marc
Here is the scp command that I run to do this:
scp $filename $login_name@$target_server:$directory
Here is the pseudocode:
if (correct login/password for the target_server){
scp filename to target_server's specified directory
enter password for user
} else {
login/password for target_server incorrect
)
Thanks,
Marc