OpenMediaVault 的 WebUI 管理用户时,只接受 RFC 4716 格式的公钥。而使用 ssh-keygen 默认生成的是 openssh 的字符串格式:

~$ cat .ssh/id_rsa.pub 

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEdD64Wz3GLG95pdTskJ4yaZv3+aVC/9+4YrSKqzvDoUGznARGShnQkLnlCFr+DnwwXuXIXRs5CHT+QOIjpGEHK3KgIBfJWhcLAfcjs2hzapn2aVMfPUexbmV6Cjyx3Vs5orJ8/E9YEJ3As13sJoh3zvhgFE9fBI2UoewlJDFPaIFObpZhVVogwaXzfw9lxkdtNGNFTdB7+fnboFW0KM17mb3mo0daqyC+q2NHcXrkeJ7EYePtjBniM+cP7y5EBeWB6eoyOqLTzoHBL1dbZfJUcecTwsFBkiid0hCosBndDjcZOjKpmiuCCSRGMcU5OTr7wzhxkVhz herald@herald-ThinkPad-T470s

转换格式:

~$ ssh-keygen -e -f .ssh/id_rsa.pub

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, converted by herald@herald-ThinkPad-T470s from"
AAAAB3NzaC1yc2EAAAADAQABAAABAQDEdD64Wz3GLG95pdTskJ4yaZv3+aVC/9+4YrSKqz
vDoUGznARGShnQkLnlCFr+DnwwXuXIXRs5CHT+QOIjpGEHK3KgIBfJWhcLAfcjs2hzapn2
aVMfPUexbmV6Cjyx3Vs5SztVO9ebP2NHorJ8/E9YEJ3As13sJoh3zvhgFE9fBI2UoewlJD
FPaIFObpZhVVogwaXzfw9lxkdtNGNFTdB7+fnboFW0KM17mb3mo0daqyC+q2NHcXrkeJ7E
YePtjBniM+cP7y5EBeWB6eoyOqLTzoHBL1dbZfJUcecTwsFBkiid0hCosBndDjcZOjKpmi
---- END SSH2 PUBLIC KEY ----