|
|
|
@ -1,13 +1,15 @@ |
|
|
|
|
require('console-stamp')(console); |
|
|
|
|
|
|
|
|
|
const |
|
|
|
|
{ name, version } = require('./package.json'), |
|
|
|
|
{ sshPort } = require('./config'), |
|
|
|
|
{ Server } = require('ssh2'), |
|
|
|
|
fs = require('fs'), |
|
|
|
|
tui = require('./lib/tui'); |
|
|
|
|
|
|
|
|
|
new Server({ |
|
|
|
|
hostKeys: [ fs.readFileSync('./host.key') ] |
|
|
|
|
hostKeys: [ fs.readFileSync('./host.key') ], |
|
|
|
|
banner: `${name} v${version} | Register with a new password or login with an existing one` |
|
|
|
|
}, client => { |
|
|
|
|
client.on('authentication', async authentication => { |
|
|
|
|
if(authentication.method !== 'password') |
|
|
|
|