【发布时间】:2018-11-21 18:12:06
【问题描述】:
我与多家金融机构合作,其中一家要求我们禁用一些用于连接它们的密码。具体来说,他们要求删除 hmac-md5 和 aes128-ctr,并建议我们删除 aes128-cbc,因为它们的安全性较低。
有没有办法通过命令行开关或 Java 安全文件轻松删除这些密码?
查看一些示例,看起来我必须构建我想要的列表,而没有上述三个(从 AES 示例复制的糟糕示例):
session.setConfig("cipher.s2c", "aes128-cbc,3des-cbc,blowfish-cbc");
session.setConfig("cipher.c2s", "aes128-cbc,3des-cbc,blowfish-cbc");
session.setConfig("CheckCiphers", "aes128-cbc");
显然,如果他们在服务器端删除它们,我的客户端将不会使用它们,但我可以看到这变得越来越普遍。我现在真的不想进行代码更改。
调试日志中的片段:
INFO: Remote version string: SSH-2.0-WS_FTP-SSH_8.5.0
INFO: Local version string: SSH-2.0-JSCH-0.1.54
INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
INFO: CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
INFO: SSH_MSG_KEXINIT sent
INFO: SSH_MSG_KEXINIT received
INFO: kex: server: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha256
INFO: kex: server: ssh-dss,ssh-rsa
INFO: kex: server: aes256-ctr,aes192-ctr,aes128-ctr,3des-cbc,blowfish-cbc,aes256-cbc,aes128-cbc
INFO: kex: server: aes256-ctr,aes192-ctr,aes128-ctr,3des-cbc,blowfish-cbc,aes256-cbc,aes128-cbc
INFO: kex: server: hmac-sha1,hmac-md5,hmac-sha2-256,hmac-sha2-384,hmac-sha2-512
INFO: kex: server: hmac-sha1,hmac-md5,hmac-sha2-256,hmac-sha2-384,hmac-sha2-512
INFO: kex: server: none
INFO: kex: server: none
INFO: kex: server:
INFO: kex: server:
INFO: kex: client: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
INFO: kex: client: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
INFO: kex: client: none
INFO: kex: client: none
INFO: kex: client:
INFO: kex: client:
INFO: kex: server->client aes128-ctr hmac-md5 none
INFO: kex: client->server aes128-ctr hmac-md5 none
【问题讨论】: