How to enable/disable ciphers

All ciphers are enabled by default. If you want to remove a cipher then use the code below. Note that you can use the same mechanism to remove other cryptographic components too. Always make sure you remove from both client->server and server->client directions.

 J2SSH Maverick

Ssh2Context context = (Ssh2Context) con.getContext(SshConnector.SSH2);
context.supportedCiphersCS().remove(Ssh2Context.CIPHER_TRIPLEDES_CTR);
context.supportedCiphersSC().remove(Ssh2Context.CIPHER_TRIPLEDES_CTR);

 

Maverick SSHD

In your Daemon.configure method use:

sshContext.supportedCiphersCS().remove(Ssh2Context.CIPHER_TRIPLEDES_CTR);
sshContext.supportedCiphersSC().remove(Ssh2Context.CIPHER_TRIPLEDES_CTR);
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.