torquemonster
MIS
Hello,
Does anyone know if it's possible to automate the use of scp in a script? I'd like to be able to write a quick script that the user could call like:
where the user specifies the filename that they'd like to copy over. (I know that I can do the same thing with ftp, but I'd prefer to use scp.) I've tried using
but it returns
Also, is it possible to tell it which user I'd like it to log in as? I didn't see any option for that in the man page...
Thanks in advance,
T.
Does anyone know if it's possible to automate the use of scp in a script? I'd like to be able to write a quick script that the user could call like:
Code:
"cpfile $1"
Code:
scp -B -f"$1" dest:/path/to/file
Code:
scp: illegal option -- 0
usage: scp [-pqrvBC46] [-F config] [-S program] [-P port]
[-c cipher] [-i identity] [-o option]
[[user@]host1:]file1 [...] [[user@]host2:]file2
Also, is it possible to tell it which user I'd like it to log in as? I didn't see any option for that in the man page...
Thanks in advance,
T.