将私钥保存到任意位置,进入到保存位置目录下 chmod 600 test_ld2.pem ssh-keygen -y -f test_ld2.pem > test_ld2.pem.pub 完成后使用cat命令来查看一下提取出的公钥: