How to set KEX on JSch Session when using Apache VFS

后端 未结 1 1572

I am using Apache VFS 2.1 with JSch 0.1.54 (latest versions today) to upload files using SFTP.

The system throws \"End of IO Stream Rea

1条回答
  •  难免孤独
    2021-01-13 18:28

    The JSch Session inherits settings from its JSch instance. And all JSch instances actually share the same global/static hashtable with settings.

    So just call static JSch.setConfig before SftpClientFactory.createConnection:

    JSch.setConfig("kex", "diffie-hellman-group1-sha1");
    

    0 讨论(0)
提交回复
热议问题