I received a public key generated by " SAP SuccessFactors " from someone who needs to connect to an SFTP, but in order for me to import the public key, I need to provide a SHA256 fingerprint.
Apparently "SAP SuccessFactors" can only produce an MD5 fingerprint. I've tried running the command " ssh-keygen -lf .fakekeyname.pub " but get the error message "fakekeyname.pub is not a public key file".
In opening up the public key file, the header says " begin ssh2 public key ", whereas I'm used to seeing something along the lines of ssh-rsa.
Apologies in advance if this seems immediately obvious, but I would sincerely appreciate some guidance or advice. Thanks very much!
You can use ssh-keygen. First you would need to convert the file to pem format first
ssh-keygen -i -m PKCS8 -f pubkey.pem > NEWpubkey.pem
Next get the fingerprint
and then you can get the sha256 value from it:
ssh-keygen -lf NEWpubkey.pem
for reference see this post: get SHA256 hash of public key
Edit: For Pub files this could work ssh-keygen -E sha256 -lf sample.pub
see How to Calculate Fingerprint From SSH RSA Public Key in Java?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.