diff --git a/app.js b/app.js index 1ceac2e..acc047f 100644 --- a/app.js +++ b/app.js @@ -117,19 +117,13 @@ io.on('connection', function(socket){ } var term; - if (process.getuid() === 0) { - term = pty.spawn('/bin/login', [], { - name: 'xterm-256color', - cols: 80, - rows: 30 - }); - } else { - term = pty.spawn('ssh', [sshuser + sshhost, '-p', sshport, '-o', 'PreferredAuthentications=' + sshauth], { - name: 'xterm-256color', - cols: 80, - rows: 30 - }); - } + + term = pty.spawn('ssh', [sshuser + sshhost, '-p', sshport, '-o', 'PreferredAuthentications=' + sshauth], { + name: 'xterm-256color', + cols: 80, + rows: 30 + }); + console.log((new Date()) + " PID=" + term.pid + " STARTED on behalf of user=" + sshuser); term.on('data', function(data) { socket.emit('output', data);