Skip to content

Commit 7e65e59

Browse files
authored
Fix SSH password authentication (#1519)
1 parent cb06c6c commit 7e65e59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/base-driver/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export default abstract class AbstractDriver<ConnectionType extends any, DriverO
154154
host: ssh.host,
155155
port: ssh.port,
156156
username: ssh.username,
157-
privateKey: fs.readFileSync(ssh.privateKeyPath),
157+
...(ssh.password ? { password: ssh.password } : {}),
158+
...(ssh.privateKeyPath ? { privateKey: fs.readFileSync(ssh.privateKeyPath) } : {}),
158159
},
159160
{
160161
dstAddr: db.host,

0 commit comments

Comments
 (0)