We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed892b7 commit 4dfdbcdCopy full SHA for 4dfdbcd
client/actions.js
@@ -30,13 +30,22 @@ const actions = {
30
});
31
32
try {
33
- conn.connect({
34
- host: config.sshHost,
35
- port: config.sshPort || 22,
36
- username: config.sshUser,
37
- privateKey: config.sshKey,
38
- passphrase: config.sshKeyPassphrase
39
- });
+ if (config.sshKey) {
+ conn.connect({
+ host: config.sshHost,
+ port: config.sshPort || 22,
+ username: config.sshUser,
+ privateKey: config.sshKey,
+ passphrase: config.sshKeyPassphrase
40
+ });
41
+ } else {
42
43
44
45
46
+ password: config.sshPassword
47
48
+ }
49
} catch (err) {
50
dispatch({ type: 'disconnect' });
51
alert(`SSH Error: ${err.message}`);
0 commit comments