ssh-tester
v1.0.0
Published
A library for repeatedly attempting to connect to an SSH server until a specified timeout occurs
Downloads
3
Readme
ssh-tester
This module will attempt to connect to a specified SSH host. A promise is returned, which is resolved upon successful connection. If unable to connect, the connection attempt is repeatedly retried until the specified timeout interval has been exceeded.
const sshTester = require('ssh-tester');
return sshTester({
'host': 'devhost.com',
'username': 'ubuntu',
'port': 22,
'private_key': fs.readFileSync('/Users/tkambler/.ssh/id_rsa', 'utf8'),
'password': '...',
'timeout': 60000 // For how long should connection attempts be attempted (ms)?
})
.then(() => {
console.log('Connected!');
});