I use "scp" command in my shell script. How do I get the error log , if that command is not working.
This is how I am using it scp file username@servername:/specificdirectory/
bashscp
I use "scp" command in my shell script. How do I get the error log , if that command is not working.
This is how I am using it scp file username@servername:/specificdirectory/
Best Answer
If you encounter an error while running
scp
, try doingssh
first to the server,scp
doesn't have a graceful handling of new keys andssh
is more verbose with error reporting by default.To get a more detailed log of what is happening, try running it with
-v
:You must also remember that path starting with
/
are absolute, not relative to your home directory, as such you may want to try: