At this time, there isn't a way to fetch the Private-Key of the HostKey associated to the server irrespective of whether it was a service generated HostKey or a customer generated HostKey. For multiple servers to use the same Private-Key, you would have to generate your own HostKey and utilize the same for your server configurations.
To your concern,
SHA256:Cv5TEDW8P3L+uqpAKtpzSWIfGcHwdrnaDyJd0wOGNx5= is a SHA256 fingerprint and cannot be used as a Private-Key. Private-Key supported by AWS Transfer Family servers as HostKey should be of format -
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAjhbPcClrabcdefghiabcdefghiabcdeHEAYGmwJtF8+EkQJp ... ... ... ... dFQqcvEF5tombtabcdefghiabcdefghiabcdeOmJ6SfZBudDmW4= -----END RSA PRIVATE KEY-----
Q: Where can i get this RSA private Key from our current running AWS SFTP server? (I tried to ssh but it does not allow) A: It isn't possible to fetch RSA Private-Key from the service. Also, SSH to the server is not supported.
Q: Would after creation of new AWS SFTP server be able to setup the host key with this command? A: Yes, the command you specified is correct and can be used to update the HostKey of the Transfer server if you want to specify your own HostKey.
Also, adding to your comment - It isn't true that Private-keys are only for migrating On-Premise environment to AWS Transfer Family. As On-Premise environments use their custom Private-keys for their servers, the guide mentions that it is possible to port them to AWS Transfer Family. In any case, the point being expressed is that customers can associate their own HostKey to their Transfer Family servers irrespective of whether they are migrating or not.
Let me know if you have questions.
AWS TRANSFER FAMILY SFTP SERVERasked 7 months ago
SFTP Transfer Family to EFS umaskasked 20 days ago
From S3 bucket to SFTP serverasked 2 months ago
connect to an internal sftp server from outside private vpc (on prem)Accepted Answerasked 15 days ago
FTP - transfer family setupasked 4 days ago
Accessing a SFTP (Transfer Family) endpoint from several domainsasked 7 months ago
Need help for setup SFTP serverasked 3 days ago
HostKey for SFTP Transfer FamilyAccepted Answerasked 6 months ago
How to SFTP to my AWS spaceasked 2 months ago
IS there a way to Shorten the SFTP endpointasked 7 months ago