我正在运行以下代码:
var sendFile = function(){
console.log("sending file to the server")
client.scp(configs.fileName, {
host: configs.hostName,
username: configs.userName,
port : 22,
password: configs.passWord,
path: configs.seam_dir,
passphrase: configs.ssh_passphrase,
privateKey: require('fs').readFileSync(configs.ssh_key_filePath)
}, function(err) {
console.log(err);
})
}
这将给出错误:
{ [Error: Timed out while waiting for handshake] level: 'connection-timeout' }
注意:配置是我拥有所有价值的地方。