JSch to add private key from a string

有些话、适合烂在心里 提交于 2019-11-29 11:17:10

There is an addIdentity overload that takes the key from a buffer:

public class JSch {
    ...
    public void addIdentity(String name, byte[]prvkey, byte[]pubkey, byte[] passphrase)

See also Java SFTP client that takes private key as a string.

For an example of implementation, see JSch: addIdentity from private key stored on hdfs.

See also Loading private key from string or resource in Java JSch in Android app for a format of the key in the buffers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!