• 13-10-2018, 09:21:46
    #1
    var SSH = require('simple-ssh');
    var ssh = new SSH({
        host: 'xxxxxxxx',
        user: 'xxx',
        pass: 'xxxxxx'
    
    });

    setInterval(function() {
        ssh.exec('code', {
            out: function(stdout) {
            console.log(stdout); 
                }
        }).start();
    
    
    }, 60000);
    Arkadaşlar amacım ssh connect ile 60 saniyede bir kodu göndermesini istiyorum lakin nedense 1 dakika sonra spama bağlıyor node.js de yeniyim
  • 13-10-2018, 09:40:32
    #2
    ssh bağlantısını sen hiç kapatmıyorsun ki 60 saniyelik bir setInterval yap callback ile ssh bağlantını yap kodu gönder oturumunu kapat.