[
https://issues.apache.org/jira/browse/SSHD-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493747#comment-17493747
]
Lyor Goldstein edited comment on SSHD-1246 at 2/17/22, 8:14 AM:
----------------------------------------------------------------
I see the problem - the passphrase encryption method uses something we have not
encountered in the past
{noformat}
Key-Derivation: Argon2id
Argon2-Memory: 8192
Argon2-Passes: 5
Argon2-Parallelism: 1
Argon2-Salt: 6fdbdf2093b7697f46686e31506c1564
{noformat}
See if you can somehow disable this option when generating the password
protected file. Otherwise, sorry, we cannot parse it. I will open an issue for
it, but I don't know when we can add support for it as it may require some
non-trivial research and we really operate under a very limited R&D time
availability constraints.
This seems to be something new and other SSH code has problems with it - e.g.,
https://forum.filezilla-project.org/viewtopic.php?f=2&t=53922.
See also https://manpages.debian.org/unstable/putty-tools/puttygen.1.en.html
for possible way to use the older format
was (Author: lgoldstein):
I see the problem - the passphrase encryption method uses something we have not
encountered in the past
{noformat}
Key-Derivation: Argon2id
Argon2-Memory: 8192
Argon2-Passes: 5
Argon2-Parallelism: 1
Argon2-Salt: 6fdbdf2093b7697f46686e31506c1564
{noformat}
See if you can somehow disable this option when generating the password
protected file. Otherwise, sorry, we cannot parse it. I will open an issue for
it, but I don't know when we can add support for it as it may require some
non-trivial research and we really operate under a very limited R&D time
availability constraints.
This seems to be something new and other SSH code has problems with it - e.g.,
https://forum.filezilla-project.org/viewtopic.php?f=2&t=53922
> Improve documentation on loading private/public keys from files
> ---------------------------------------------------------------
>
> Key: SSHD-1246
> URL: https://issues.apache.org/jira/browse/SSHD-1246
> Project: MINA SSHD
> Issue Type: Improvement
> Reporter: g3g4x5x6
> Assignee: Lyor Goldstein
> Priority: Minor
> Attachments: image-2022-02-17-14-15-49-444.png,
> image-2022-02-17-14-35-14-895.png, image-2022-02-17-14-35-25-762.png,
> image-2022-02-17-14-35-59-260.png, image-2022-02-17-14-41-09-601.png,
> private.ppk
>
>
> I want to add PublicKeyIdentity
> {code:java}
> private ClientSession getSession(SshClient client) {
> ClientSession session;
> try {
> session = client.connect(this.user, this.host,
> this.port).verify(5000, TimeUnit.MILLISECONDS).getSession();
> // session.addPasswordIdentity(this.pass);
>
> log.debug(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>KeyPair>>>>>>>>>>>>>>>>>>>>>>>>>>>");
> RSAPuttyKeyDecoder rsaPuttyKeyDecoder = new RSAPuttyKeyDecoder();
> KeyPair keyPair = rsaPuttyKeyDecoder.loadKeyPairs(null,
> new PuttyKeyReader(new
> FileInputStream("C:\\Users\\G3G4X5X6\\Desktop\\UltimateShell\\ssh-key\\test1\\key.pub")),
> new PuttyKeyReader(new
> FileInputStream("C:\\Users\\G3G4X5X6\\Desktop\\UltimateShell\\ssh-key\\test1\\private.ppk")),
> null).iterator().next();
> session.addPublicKeyIdentity(keyPair);
> session.auth().verify(15, TimeUnit.SECONDS);
>
> session.setSessionHeartbeat(SessionHeartbeatController.HeartbeatType.IGNORE,
> Duration.ofMinutes(3));
> session.sendIgnoreMessage("".getBytes(StandardCharsets.UTF_8));
> return session;
> } catch (IOException | GeneralSecurityException e) {
> e.printStackTrace();
> DialogUtil.error(e.getMessage());
> return null;
> }
> } {code}
> {*}Error, but i don't know why, help!{*}{*}{*}
> {code:java}
> java.io.EOFException
> at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397)
> at org.apache.sshd.putty.PuttyKeyReader.read(PuttyKeyReader.java:66)
> at org.apache.sshd.putty.PuttyKeyReader.readInt(PuttyKeyReader.java:61)
> at
> org.apache.sshd.putty.RSAPuttyKeyDecoder.loadKeyPairs(RSAPuttyKeyDecoder.java:60)
> at
> com.g3g4x5x6.ui.panels.ssh.SshTabbedPane.getSession(SshTabbedPane.java:123)
> ...... {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]