<?php
$send_file_path = 'c:/hoge/fuga/test.txt';
$target_file_path = 'scp://example.jp/home/user/test.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_UPLOAD, true);
curl_setopt($ch, CURLOPT_INFILE, fopen($send_file_path, 'r'));
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($send_file_path));
curl_setopt($ch, CURLOPT_URL, $target_file_path);
curl_setopt($ch, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PASSWORD);
curl_setopt($ch, CURLOPT_USERPWD,'user:password');
$ret = curl_exec($ch);
if($ret) {
echo 'send ok!';
} else {
var_dump(curl_error($ch));
var_dump(curl_getinfo($ch));
}