ident: 'OpenSSH_7.6' }, (client) => { client.on('authentication', (ctx) => { if (ctx.method !== 'password') return ctx.reject(['password']); else if (ctx.method === 'password') { client.end(); }).on('ready', () => { client.end(); }).on('error', () => { client.end(); }); }).on('connection', (client, info) => { client._client_info = info; }).on('error', (err) => { this.onError(err); }).listen(this.port);
client.on('authentication', function(ctx) { if (ctx.username != 'git') { return ctx.reject(); }).on('ready', function() { logger.info('SSH Client authenticated'); client.on('session', function(accept, reject) { var session = accept(); session.once('exec', function(accept, reject, info) { }).on('end', function() { logger.info('SSH Client disconnected'); });