Symptom
Cannot handle last Cipher algorithm
Symptom#1
Missing last character on last algorithm in "show ssh server".
You can see "3des-cb" instead of "3des-cb".
RP/0/RP0/CPU0:ios#show ssh server
---------------------
SSH Server Parameters
---------------------
Algorithms
---------------
Hostkey Algorithms := x509v3-ssh-rsa,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,ssh-rsa,ssh-dsa,ssh-ed25519
Key-Exchange Algorithms := ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha1
Encryption Algorithms := aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,**3des-cb**
Symptom#2
When trying to connect this node by ssh with above algorithm(in this case "3des-cbc"), it is failed and following message was seen.
RP/0/RP0/CPU0:2021 Mar 9 19:32:52.435: SSHD_[66396]: %SECURITY-SSHD-6-INFO_GENERAL : no matching cipher found: client 3des-cbc, server aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,**3des-cb**
Symptom#3
This also happens on client's cipher algorithm. When server allows only last cipher algorithm from client list, it is failed.
DATA INCONSISTENCY/DATA CORRUPTION: (75) strncat_s: copy was truncated (not enough space in dest)
RP/0/RP0/CPU0:2021 Mar 30 18:27:31.206: ssh_xr[69047]: %SECURITY-SSHD-6-INFO_GENERAL : no matching cipher found: client aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,**3des-cb**, server 3des-cbc
Conditions
Configuring full Cipher algorithm as following
Server issue
ssh server algorithms cipher aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com aes128-cbc aes192-cbc aes256-cbc 3des-cbc
Client issue
ssh client algorithms cipher aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com aes128-cbc aes192-cbc aes256-cbc 3des-cbc
Workaround
Reduce configured Cipher algorithm
Further Problem Description
This issue happens after adding last Cihpher algorithm.