Bad port stored into known_hosts2
Newer versions of freerdp also store the TCP port number into the known_hosts2 file. This has two unwanted side effects for remmina: 1. Remmina stored the TCP port within the hostname field when port is different from 3389, for example, so we end up with two different syntaxes for freerdp and remmina when connecting to ports which are not 3389
# known_hosts2
# Remmina style
mypc.mydom.com 22077 1c:c8:84:3c:04:6f:76:d4:71:ed:4b:a2:6b:d6:e6:89:27:a8:b3:c5 ...
# newer freerdp style
mypc.mydom.com:22077 22077 1c:c8:84:3c:04:6f:76:d4:71:ed:4b:a2:6b:d6:e6:89:27:a8:b3:c5 ...
We can fix at the remmina side just removing :port from the CertificateName parameter. 2. When remmina is using an ssh tunnel, the TCP port stored in the known_hosts2 file is the local ssh port of the tunnel, and not the real RDP server port:
# known_hosts2
# Correct entry when using xfreerdp or remmina without ssh tunnel
mypc.mydom.com 3389 29:8a:22:a2:d1:ff:f7:0a:39:78:d8:4b:37:fb:11:8a:e7:d8:1c:30 ...
# When using remmina ssh tunnel
mypc.mydom.com 4732 29:8a:22:a2:d1:ff:f7:0a:39:78:d8:4b:37:fb:11:8a:e7:d8:1c:30 ...
4732 is Remmina's DEFAULT_SSHTUNNEL_PORT, is a constant value. Unfortunately at the remmina side, we cannot currently change the port that is used when creating the known_hosts2 line. We need some extra parameter from the freerdp team to set the correct certificate port.