copy a file while ssh to server code example Example: ssh transfer file from local to remote scp file.txt [email protected]:/remote/directory