feat(ssh): fix key store

This commit is contained in:
Alexey Kasyanchuk
2018-03-17 21:42:17 +03:00
parent 09838fb286
commit 0b8732cbb8

View File

@ -48,6 +48,11 @@ const startSSH = (port, host, user, password, callback) => {
ssh.stdout.on('data', (data) => { ssh.stdout.on('data', (data) => {
console.log(`ssh: ${data}`) console.log(`ssh: ${data}`)
checkMessage(data) checkMessage(data)
if(data.includes('Store key in cache?'))
{
ssh.stdin.write("y")
ssh.stdin.end()
}
}) })
ssh.stderr.on('data', (data) => { ssh.stderr.on('data', (data) => {
@ -57,6 +62,11 @@ const startSSH = (port, host, user, password, callback) => {
{ {
ssh.kill() ssh.kill()
} }
if(data.includes('Store key in cache?'))
{
ssh.stdin.write("y")
ssh.stdin.end()
}
}); });
ssh.on('close', (code, signal) => { ssh.on('close', (code, signal) => {