Skip to content

Commit

Permalink
fix(ssh): fix ssh password being ignored
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
luin committed Feb 1, 2016
1 parent ed892b7 commit 4dfdbcd
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions client/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,22 @@ const actions = {
});

try {
conn.connect({
host: config.sshHost,
port: config.sshPort || 22,
username: config.sshUser,
privateKey: config.sshKey,
passphrase: config.sshKeyPassphrase
});
if (config.sshKey) {
conn.connect({
host: config.sshHost,
port: config.sshPort || 22,
username: config.sshUser,
privateKey: config.sshKey,
passphrase: config.sshKeyPassphrase
});
} else {
conn.connect({
host: config.sshHost,
port: config.sshPort || 22,
username: config.sshUser,
password: config.sshPassword
});
}
} catch (err) {
dispatch({ type: 'disconnect' });
alert(`SSH Error: ${err.message}`);
Expand Down

0 comments on commit 4dfdbcd

Please sign in to comment.