This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251641

Summary: Algorithm negotiation fail for any SFTP connection
Product: php Reporter: daorus
Component: FTP SupportAssignee: Tomas Mysik <tmysik>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot of testing connections
Putty cound not connect

Description daorus 2015-04-04 11:11:14 UTC
one day ago something happened with SFTP

all these years when I was uploading files to server It asked if it should trust certificate or not, and today it does not ask anymore and creates error:

Could not connect to server m***.com
(Cause: Algorithm negotiation fail)

1) When I connect to any server vie Filezilla - everything is great
2) When I connect to server via FTP in Netbeans - everything is great

So, the problem is not in server, and problem is not with SFTP
the problem in Netbeans or in some Java component which provides SFTP for Netbeans

About my env:

Product Version: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
Runtime: Java(TM) SE Runtime Environment 1.6.0_16-b01
System: Windows XP version 5.1 running on x86; Cp1251; en_US (nb)
User directory: C:\temp\netbeans\m****
Cache directory: C:\temp\netbeans\m***\var\cache

Output log:

Connecting to m***.com port 22
Connection established
Remote version string: SSH-2.0-OpenSSH_6.7p1-hpn14v5
Local version string: SSH-2.0-JSCH-0.1.45
CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
aes256-ctr is not available.
aes192-ctr is not available.
aes256-cbc is not available.
aes192-cbc is not available.
arcfour256 is not available.
CheckKexes: diffie-hellman-group14-sha1
diffie-hellman-group14-sha1 is not available.
SSH_MSG_KEXINIT sent
SSH_MSG_KEXINIT received
Disconnecting from mkya.ru port 22
QUIT
Goodbye
Comment 1 daorus 2015-04-04 11:13:15 UTC
Created attachment 153033 [details]
Screenshot of testing connections
Comment 2 daorus 2015-04-04 11:14:04 UTC
I tested for 5 servers and all of them fail to connect with netbeans but connection is working via Filesilla or via Putty
Comment 3 daorus 2015-04-04 11:19:12 UTC
Created attachment 153034 [details]
Putty cound not connect
Comment 4 daorus 2015-04-04 11:20:27 UTC
Netbeans could not connect via SSH / SFTP
Putty could not connect via SSH

but Filezilla connects ok for all the servers
Comment 5 daorus 2015-04-08 15:51:45 UTC
Solution is found!!

Netbeans 7.3 Bets 2 uses JSch library 1.0.45
This version do not work with OpenSSH 6.7
It works only with OpenSSH 6.6.1 and earlier versions

But JSch library 1.0.52 works with OpenSSH 6.7

1) Download this version 

2) Rename current file to backup C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\com-jcraft-jsch.jar

rename to com-jcraft-jsch.jar.1.0.42.bak

3) Copy downloaded com-jcraft-jsch.jar of version 1.0.52 to this folder

4) Restart Netbeans

Bingo!! SSH works again and works with OpenSSH 6.7 servers
Comment 6 Tomas Mysik 2015-04-09 05:23:19 UTC
Thanks for letting us know.

(In reply to daorus from comment #5)
> Netbeans 7.3 Bets 2

BTW why are you using so old version of NetBeans? Moreover, the Beta version? Feel free to download latest stable version of NetBeans [1].

Thanks.
[1] https://netbeans.org/downloads/
Comment 7 daorus 2015-04-09 08:00:22 UTC
> BTW why are you using so old version 
> of NetBeans? Moreover, the Beta version? 
> Feel free to download latest stable 
> version of NetBeans [1].

Because someone decided to make error badges on files and there is not turn off option

We created a bug report
it was P1 priority
development team always marked it as fixed, but these error badges were still there

when we tried to reopen it, they forced to close bug report to fixed and told us to create new bug report

and we decided FUCK YOU all with your fucking bureaucracy
and now we had to use Netbeans 7.3 Beta 2

here is a bug report:

https://netbeans.org/bugzilla/show_bug.cgi?id=226954

here are questions from people who had suffer the same problem:

http://stackoverflow.com/questions/25692678/how-to-disable-netbeans-error-badges
http://stackoverflow.com/questions/3421932/is-there-a-way-to-reset-the-error-badges-in-netbeans
Comment 8 svd 2015-08-21 19:04:06 UTC
(In reply to daorus from comment #5)
> Solution is found!!
> 
> Netbeans 7.3 Bets 2 uses JSch library 1.0.45
> This version do not work with OpenSSH 6.7
> It works only with OpenSSH 6.6.1 and earlier versions
> 
> But JSch library 1.0.52 works with OpenSSH 6.7
> 
> 1) Download this version 
> 
> 2) Rename current file to backup C:\Program Files\NetBeans 7.3 Beta
> 2\ide\modules\com-jcraft-jsch.jar
> 
> rename to com-jcraft-jsch.jar.1.0.42.bak
> 
> 3) Copy downloaded com-jcraft-jsch.jar of version 1.0.52 to this folder
> 
> 4) Restart Netbeans
> 
> Bingo!! SSH works again and works with OpenSSH 6.7 servers

Thank you! Same problem was in 8.0.2 & OpenSSH 6.7
Comment 9 echterhoff 2016-01-06 13:25:41 UTC
(In reply to daorus from comment #5)
> Solution is found!!
> 
> Netbeans 7.3 Bets 2 uses JSch library 1.0.45
> This version do not work with OpenSSH 6.7
> It works only with OpenSSH 6.6.1 and earlier versions
> 
> But JSch library 1.0.52 works with OpenSSH 6.7
> 
> 1) Download this version 
> 
> 2) Rename current file to backup C:\Program Files\NetBeans 7.3 Beta
> 2\ide\modules\com-jcraft-jsch.jar
> 
> rename to com-jcraft-jsch.jar.1.0.42.bak
> 
> 3) Copy downloaded com-jcraft-jsch.jar of version 1.0.52 to this folder
> 
> 4) Restart Netbeans
> 
> Bingo!! SSH works again and works with OpenSSH 6.7 servers

Same for me. After upgrading my server from debian wheezy to jessie I ws not able to make a sftp connection with mit Netbeans 8.0.2. Copied the com-jcraft-jsch.jar from Netbeans 8.1 (gonna switch to that version but still evaluating it.)