从client.key上的keyPair.getPrivate()获得privateKey;当我这样做时: keyStore.setKeyEntry("alias",privateKey,passphrasejava.security.KeyStoreException: BCFKS KeyStore exception storing have the same modulus .
我使用openssl生成一对密钥:Generating public/private rsa key pair.Enter file in which to save the key (/Users/mike/.ssh/id_rsa): /path/to/test_rsa
Enter passphrase (emptyYour public key has been s