diff --git a/app.js b/app.js index 54441bb..950a7bf 100644 --- a/app.js +++ b/app.js @@ -54,7 +54,8 @@ app.get('/ssh/host/:host?', function (req, res, next) { }, readyTimeout: (validator.isInt(req.query.readyTimeout + '', {min: 1, max: 300000}) && req.query.readyTimeout) || config.ssh.readyTimeout, - verify: config.verify || false + verify: config.verify || false, + keepaliveInterval: config.keepaliveInterval || 0 } if (req.session.ssh.header.name) validator.escape(req.session.ssh.header.name) if (req.session.ssh.header.background) validator.escape(req.session.ssh.header.background) diff --git a/config.json b/config.json index 738373a..d8b06ad 100644 --- a/config.json +++ b/config.json @@ -59,5 +59,6 @@ "server": false // not yet implemented }, "accesslog": false, // http style access logging to console.log - "verify": false // verification of host key hashes, see hostkeyhashes.json + "verify": false, // verification of host key hashes, see hostkeyhashes.json + "keepaliveInterval": 0 // value in milliseconds, 0 = disable } diff --git a/socket.js b/socket.js index c07cacd..d9af678 100644 --- a/socket.js +++ b/socket.js @@ -130,6 +130,7 @@ module.exports = function socket (socket) { return (noverify = true) } }, + keepaliveInterval: socket.request.session.ssh.keepaliveInterval, debug: debug('ssh2') }) } else {