ssh2 和 ssh 的公钥转换
ssh2 转 ssh
ssh-keygen -i -f test_ssh2.pub > test_ssh.pub
ssh 转 ssh2
ssh-keygen -e -f test_ssh.pub > test_ssh2.pub
ssh2格式样例:
---- BEGIN SSH2 PUBLIC KEY ---- Comment: "3072-bit RSA, converted by test@test " AAAAB3NzaC1yc2EAAAADAQABAAABgQDLpmlp2abVywZryuKMpkx4BVxyqPLWviEMIqSO1x 61j7hZTgFcGxf/TZuY+EZljBq6JiQFhZVeIt397x+5znlNrnVrlF72m5/F3BJxLKcvXSKY KISkOgum3KcPRU+y+igyR7IDfnR05ksguZABF1MwolzJQM9X6UDoXyeShXxyS2qsQindfn y9KIO6EnUvlX47d/u/Kjla5lyGeUAcb5pTD0wF35+xE8QdxK4iHdGmSSQpMmJZfiHoAYKf XUKYPR2VaprZCKdIxyGMKHOrRW7U0sFx9td1EC1yneF3dHus1muUqafGUMzDEReW/tBMbx pgcsVtZOLBCgPztkVmbP0HSxb+X/EQje/v0v+BYv+c291Xd+qeJAQ9dF47cInjKm9VssxM oS4u4BtjIpLKCzLtxBsNEOtdZoTYBHlMtVv4N1QVZRf/OqAnX0eb2FBFXTjD5x7OYasOVY N/KDOIbH2yr5Qz1OAIdlm7VsAD6DbKkAFMJZIlbNjjvp2UKsEqg80= ---- END SSH2 PUBLIC KEY ----
ssh格式样例:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLpmlp2abVywZryuKMpkx4BVxyqPLWviEMIqSO1x61j7hZTgFcGxf/TZuY+EZljBq6JiQFhZVeIt397x+5znlNrnVrlF72m5/F3BJxLKcvXSKYKISkOgum3KcPRU+y+igyR7IDfnR05ksguZABF1MwolzJQM9X6UDoXyeShXxyS2qsQindfny9KIO6EnUvlX47d/u/Kjla5lyGeUAcb5pTD0wF35+xE8QdxK4iHdGmSSQpMmJZfiHoAYKfXUKYPR2VaprZCKdIxyGMKHOrRW7U0sFx9td1EC1yneF3dHus1muUqafGUMzDEReW/tBMbxpgcsVtZOLBCgPztkVmbP0HSxb+X/EQje/v0v+BYv+c291Xd+qeJAQ9dF47cInjKm9VssxMoS4u4BtjIpLKCzLtxBsNEOtdZoTYBHlMtVv4N1QVZRf/OqAnX0eb2FBFXTjD5x7OYasOVYN/KDOIbH2yr5Qz1OAIdlm7VsAD6DbKkAFMJZIlbNjjvp2UKsEqg80= test@test