Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTP connection issue: Can't open path: Could not connect to SFTP server #609

Open
DavidAccola opened this issue Apr 19, 2022 · 8 comments
Assignees
Labels
Milestone

Comments

@DavidAccola
Copy link

Are there any known issues are quirks with connecting to SFTP? I am able to connect to a server over SFTP using WinSCP without issue, but not with OtrosLogViewer when using the same credentials. (FTP works fine, just not SFTP.)

Can't open path: Could not connect to SFTP server at "xxx.xxxxxxxxxxxxxx.com"

winscp0
winscp1
winscp2
olv

@svennissel
Copy link
Collaborator

Can you append the olv.log in home directory? Did you type before wrong username and password? Did it work after restart OtrosLogViewer?

@benlazaro
Copy link
Contributor

I think this has to do with issue #608 as well (zip format). I tried reproducing your problem using a free public SFTP server and I was able to access a readme.txt file stored in the server without any issues.
Try connecting the "rebex" server from the following website: https://www.sftp.net/public-online-sftp-servers
If you are able to open the readme.txt file, then we will need to wait until issue #608 is resolved before we try to fix this one. The readme.txt file won't parse correctly in OLV, but I'm expecting you not to get the error message you're getting with zip file.
Let us know how the test went.

@DavidAccola
Copy link
Author

DavidAccola commented Apr 20, 2022

@benlazaro Ha, my screenshot was misleading, sorry. This one doesn't have anything to do with .zip files, that's just the last thing I had up on my screen locally before I tried to connect to this SFTP server. Thanks for the test SFTP. Yes, I'm able to connect to test.rebex.net:22 without issue. Looks like the difference is the encryption algorithms each server uses.

@svennissel The username and password are right. It doesn't work after restart. I started fresh and have attached the log. What stands out is:

Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail

olv.log

test.rebex.net:22 which works uses ssh-ed25519 255
The server I'm trying to connect to and can't uses ssh-rsa 1024

@nuessgens
Copy link

nuessgens commented Apr 20, 2022

@svennissel maybe one "just" have to add bouncy castle crypto dependency to support "latest" cipher suits/ algorithms which are not present in the currently used jdk version?

I'll try to reproduce it tomorrow.

@DavidAccola
Copy link
Author

Doing some searching on that error, it could also be that this OtrosLogViewer uses Zlib compression and the SFTP server does not support Zlib compression. I haven't figured out how to check that yet (don't have any control over this SFTP server).

@svennissel svennissel self-assigned this Apr 20, 2022
@svennissel svennissel added this to the 1.4.18 milestone Apr 20, 2022
@svennissel svennissel assigned nuessgens and unassigned svennissel Apr 21, 2022
nuessgens pushed a commit to svennissel/otroslogviewer that referenced this issue Apr 21, 2022
@nuessgens
Copy link

nuessgens commented Apr 21, 2022

I created a pull-request #615

With this new ssh-algorithms are supported (e.g. ssh-ed25519)

@DavidAccola I'm not quite sure if this resolves your issue. I found the following in the jsch FAQ

As of the 0.2.0 release, the RSA/SHA1 signature algorithm is disabled by default.

If the server is using such signature algorithm maybe you can try starting OtrosLogViewer with the described system-properties to re-enable ssh-rsa

svennissel added a commit that referenced this issue Apr 21, 2022
@svennissel svennissel modified the milestones: 1.4.18, 1.4.17 Apr 21, 2022
@DavidAccola
Copy link
Author

Thanks for the info!

@svennissel
Copy link
Collaborator

@DavidAccola:
Can you run the following commands to get a list of supported algorithms
ssh -Q cipher
ssh -Q mac
ssh -Q kex
ssh -Q key
I have this commands from https://superuser.com/questions/868998/how-can-i-find-a-list-of-macs-ciphers-and-kexalgorithms-that-my-openssh-client

And try please this version included the fix of @nuessgens
https://drive.google.com/file/d/1Iuh9tSsoXKzwmsQB9MPYh2tA5V5zKkHQ/view?usp=sharing

@svennissel svennissel self-assigned this Apr 24, 2022
@svennissel svennissel modified the milestones: 1.4.17, 1.4.18, 1.4.19 Apr 24, 2022
@svennissel svennissel added the bug label May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants