From 0b8732cbb8bd009fae41b7e9f5c075beb6e76633 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Sat, 17 Mar 2018 21:42:17 +0300 Subject: [PATCH] feat(ssh): fix key store --- src/background/ssh.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/background/ssh.js b/src/background/ssh.js index 943a31b..8e2b859 100644 --- a/src/background/ssh.js +++ b/src/background/ssh.js @@ -48,6 +48,11 @@ const startSSH = (port, host, user, password, callback) => { ssh.stdout.on('data', (data) => { console.log(`ssh: ${data}`) checkMessage(data) + if(data.includes('Store key in cache?')) + { + ssh.stdin.write("y") + ssh.stdin.end() + } }) ssh.stderr.on('data', (data) => { @@ -57,6 +62,11 @@ const startSSH = (port, host, user, password, callback) => { { ssh.kill() } + if(data.includes('Store key in cache?')) + { + ssh.stdin.write("y") + ssh.stdin.end() + } }); ssh.on('close', (code, signal) => {