Strange certificate key format from wodSFTP- need (General questions)
Hi there,
I used sample SFTP certificate-authentication code provided to save public certificates, but now I cannot read those files... I need to convert them to a standard format, like OpenSSH or PEM. How can I do this?
Here's the thing- It makes no sense to me.. Here is the public key that PuttyGen says belongs to the private key:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBhIyRM7vKBdOm3//5FoRzS4Vojn5u1C1B4+ofLG748HW/BwznKYHxUNqWd0SjG77lgOfzJueQSbXIpAcHPEFOUpQ6P5/z5q5k5r6gr2UZBH6ln5T1EkiA8yE41Jk4woOoWnDtcB2Aqn2cqjGZ57YEbypm+NrONclXbBliLkq/QHQ== rsa-key-20130703
But HERE is the Base64 encoding (I converted it from binary) from the .publickey file saved by wodSFTPServer:
AAAAB3NzaC1yc2EAAACAYSMkTO7ygXTpt//+RaEc0uFaI5+btQtQePqHyxu+PB1vwcM5ymB8VDalndEoxu+5YDn8ybnkEm1yKQHBzxBTlKUOj+f8+auZOa+oK9lGQR+pZ+U9RJIgPMhONSZOMKDqFpw7XAdgKp9nKoxmee2BG8qZvjazjXJV2wZYi5Kv0B0AAAABJSU=
So strange... The header is there but the data is different.
THE CODE:
1. During Certificate Login, if it fails, set the Tag to the public key:
If Action = Deny Or Action = SilentDeny Then
AddDebug User.Login + : Certificate Login Denied.
' if not valid then save this for LoginPassword event
User.Tag = Certificate.PublicKey
end if
2. During the LoginPassword..
IF PASSWORD LOGIN CORRECT:
Open App.path & Keys & Login & .publickey For Random As #1 Len = 1
For i = 1 To Len(User.Tag)
a = Mid$(User.Tag, i, 1)
Put #1, i, a
Next i
Close #1
AddDebug User.Login + : Key saved.
' That is how the key is generated
Please help, thanks!
Anything that will let me convert these raw keys into a known format is a big help!