console.log("start load: "+new Date());
ssh.exec('cat > /path/to/remote/file', {
in: fs.readFileSync('/path/to/local/file'),
exit: function(code) {
console.log("final load: "+new Date());
}
}).start();
Find more questions by tags HTMLJavaScriptNode.jsnpmSSH