java - Is this safe to share private key in JCraft JSch -
in jcraft based sftp communication established using jsch library project. works doubt why have share private key below?
jsch jsch=new jsch(); jsch.addidentity(ex. ~/.ssh/id_dsa);
i knew when communication happens, client has produce public key, here share private key of client. please me risky share private key here.
no, it's not risky give jsch private key.
in order make asymmetric cryptography work, have use private key. in case, jsch doing job you, won't send anyone, it's using decrypt data receive, , encrypt data send.
not trusting every library can find thing. in fact, possible jsch send private key other credentials server. thing open source: you can take look if jsch these kind of things! (but aware source code poorly documented , not written, take time see yourself)
as far know, doesn't, , guess wouldn't de-facto standard ssh in java if would.
Comments
Post a Comment