* Add .gitignore
* Use 'privateKeyPem' and 'privateKeyPass' for SSH
This commit is contained in:
parent
bddc575158
commit
349549fae2
|
@ -0,0 +1,8 @@
|
||||||
|
# Don't check in SSH keys!
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# Various directories
|
||||||
|
logs/
|
||||||
|
db/
|
||||||
|
dropfiles/
|
||||||
|
node_modules/
|
|
@ -132,8 +132,17 @@ function getDefaultConfig() {
|
||||||
ssh : {
|
ssh : {
|
||||||
port : 8889,
|
port : 8889,
|
||||||
enabled : true,
|
enabled : true,
|
||||||
rsaPrivateKey : paths.join(__dirname, './../misc/default_key.rsa'),
|
|
||||||
dsaPrivateKey : paths.join(__dirname, './../misc/default_key.dsa'),
|
//
|
||||||
|
// Private key in PEM format
|
||||||
|
//
|
||||||
|
// Generating your PK:
|
||||||
|
// > openssl genrsa -des3 -out ./misc/ssh_private_key.pem 2048
|
||||||
|
//
|
||||||
|
// Then, set servers.ssh.privateKeyPass to the password you use above
|
||||||
|
// in your config.hjson
|
||||||
|
//
|
||||||
|
privateKeyPem : paths.join(__dirname, './../misc/ssh_private_key.pem'),
|
||||||
firstMenu : 'sshConnected',
|
firstMenu : 'sshConnected',
|
||||||
firstMenuNewUser : 'sshConnectedNewUser',
|
firstMenuNewUser : 'sshConnectedNewUser',
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,6 @@ exports.moduleInfo = {
|
||||||
|
|
||||||
exports.getModule = SSHServerModule;
|
exports.getModule = SSHServerModule;
|
||||||
|
|
||||||
/*
|
|
||||||
TODO's
|
|
||||||
* Need to handle new user path
|
|
||||||
=> [ new username(s) ] -> apply path ->
|
|
||||||
=> "new" or "apply" -> ....
|
|
||||||
*/
|
|
||||||
|
|
||||||
function SSHClient(clientConn) {
|
function SSHClient(clientConn) {
|
||||||
baseClient.Client.apply(this, arguments);
|
baseClient.Client.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -239,7 +232,8 @@ SSHServerModule.prototype.createServer = function() {
|
||||||
SSHServerModule.super_.prototype.createServer.call(this);
|
SSHServerModule.super_.prototype.createServer.call(this);
|
||||||
|
|
||||||
var serverConf = {
|
var serverConf = {
|
||||||
privateKey : fs.readFileSync(Config.servers.ssh.rsaPrivateKey),
|
privateKey : fs.readFileSync(Config.servers.ssh.privateKeyPem),
|
||||||
|
passphrase : Config.servers.ssh.privateKeyPass,
|
||||||
ident : 'enigma-bbs-' + enigVersion + '-srv',
|
ident : 'enigma-bbs-' + enigVersion + '-srv',
|
||||||
// Note that sending 'banner' breaks at least EtherTerm!
|
// Note that sending 'banner' breaks at least EtherTerm!
|
||||||
debug : function debugSsh(dbgLine) {
|
debug : function debugSsh(dbgLine) {
|
||||||
|
|
Loading…
Reference in New Issue