I'm using http://phpseclib.sourceforge.net/ to make an SSH connection to my server, then execute an SCP command to transfers to a remote server. The library's
exec() method returns a string (looks like the standard output of the SCP command) instead of the return value of the command (e.g.
0 to indicate success).
I'm reluctant to do some sort of string comparison to determine if the SCP transfer was successful or not (right now, I get "stdin: is not a tty"). Is there an SSH command I can use to determine if a file exist on another server? Or any suggestions on how else I can verify if the file transferred?