Add SSH server banner

master
Tiana Lemesle 1 year ago
parent cba4e51cc4
commit dce064e381
  1. 4
      index.js

@ -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')

Loading…
Cancel
Save