imagej / imagej/imagej-plugins-uploader-ssh

Fall back to credentials when ssh keys fail on sftp upload

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When trying to upload to our private ftp update site from an up-to-date Fiji installation (on Windows), I now get the following exception:

```
[ERROR] com.jcraft.jsch.JSchException: invalid privatekey: [B@5584d17
at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:406)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:366)
at net.imagej.plugins.uploaders.ssh.SSHSessionCreator.connect(SSHSessionCreator.java:80)
at net.imagej.plugins.uploaders.ssh.SSHSessionCreator.getSession(SSHSessionCreator.java:251)
at net.imagej.plugins.uploaders.ssh.SSHFileUploader.login(SSHFileUploader.java:81)
at net.imagej.updater.FilesUploader.login(FilesUploader.java:410)
at net.imagej.ui.swing.updater.UpdaterFrame.upload(UpdaterFrame.java:801)
at net.imagej.ui.swing.updater.UpdaterFrame$5$1.run(UpdaterFrame.java:309)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in SSHSessionCreator.connect at line 80, then follow the login flow through SSHSessionCreator.getSession and SSHFileUploader.login. Reproduce the Windows SFTP upload with the failing private key and verify that the uploader falls back to credentials and completes the upload when key loading fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.