-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I tried to connect to my VM using nanoCloud, but there is no possibility to set private-key-password. When I tried to set KEY_PASSWORD, there was no result. I see, that You use JSch inside project to connect with VM's and I tried to connect with clean JSch library and all is good, but in nanoCloud there is no possibility to set this JSch property. The JSch identity is added in SimpleSshSessionProvider in line:
jsch.addIdentity(path)
I need one small fix to have possibility to set second argument of addIdentity method - "password" like this:
jsch.addIdentity(path, sshPassword)
Below I paste the example of working key auth by JSch (maybe will be useful/helpful):
JSch jsch = new JSch();
jsch.addIdentity("path", "password");
Session session = jsch.getSession("user", "0.0.0.0", 22);
session.setConfig("PreferredAuthentications", "publickey,keyboard-interactive,password");
session.setConfig("StrictHostKeyChecking", "no");
session.connect();
Metadata
Metadata
Assignees
Labels
No labels