* Add .gitignore

* Use 'privateKeyPem' and 'privateKeyPass' for SSH
This commit is contained in:
Bryan Ashby 2015-10-27 20:46:30 -06:00
parent bddc575158
commit 349549fae2
3 changed files with 21 additions and 10 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Don't check in SSH keys!
*.pem
# Various directories
logs/
db/
dropfiles/
node_modules/

View File

@ -132,8 +132,17 @@ function getDefaultConfig() {
ssh : {
port : 8889,
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',
firstMenuNewUser : 'sshConnectedNewUser',
}

View File

@ -25,13 +25,6 @@ exports.moduleInfo = {
exports.getModule = SSHServerModule;
/*
TODO's
* Need to handle new user path
=> [ new username(s) ] -> apply path ->
=> "new" or "apply" -> ....
*/
function SSHClient(clientConn) {
baseClient.Client.apply(this, arguments);
@ -239,7 +232,8 @@ SSHServerModule.prototype.createServer = function() {
SSHServerModule.super_.prototype.createServer.call(this);
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',
// Note that sending 'banner' breaks at least EtherTerm!
debug : function debugSsh(dbgLine) {