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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -