1.0.0 • Published 6 years ago

ssh-tester v1.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

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!');
	});