I am first downloading a config file locally then I have to push that file into logstash server in the path - /etc/logstash/conf.d
const deployLogstash = function(req , res , next){
clientscp.scp('./config-files/15287774.conf', {
host: '172.30.74.250',
port:5000,
username: 'ubuntu',
path: 'root@vm2:/etc/logstash/conf.d/newconfig.conf'
}, function(err,success) {
if(err){
console.log("files failed to upload in remote server"+err);
}
else{
console.log("files uploaded to remote server")
}
});
}
And this is the console.log
serverError: connect ECONNREFUSED 172.30.74.250:5000
Is there any way I could transfer config files to that path?Please help me!