使用Linux主机生成的密匙
1、生成密匙[root@www.linuxidc.com .ssh]#
ssh-keygen -t rsaGenerating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in
/root/.ssh/id_rsa.
Your public key has been saved in
/root/.ssh/id_rsa.pub.
The key fingerprint is:
e4:9a:47:a7:b4:8a:0b:98:07:b8:70:de:6b:16:2c:0croot@www.linuxidc.com
2、将 /root/.ssh/id_rsa.pub改名为/root/.ssh/authorized_keys[root@www.linuxidc.com .ssh]#
mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys3、将私钥id_rsa拷贝到远程客户端1)、如果远程客户端是linux,拷贝到远程客户端/root/.ssh/即可
2)、putty作为远程客户端在
putty不能识别直接从服务器拷贝来的私钥,需要使用puttygen.exe进行格式转换
(1)、打开puttygen.exe --> Conversions --> Import Key
(2)、选择拷贝过来的私钥文件id_rsa
(3)、Save private key->id_rsa.ppk(保存私钥)
4、打开putty.exe1)、Session --> Host Name (填写服务器地址或者域名)
2)、Connection --> SSH --> Auth (点Browse选择刚生成的id_rsa.ppk)
3)、open
成功打开后出现如下提示:
login as: root
Authenticating with public key "imported-openssh-key"
----------------------------------------------------------------------------------
当然你有可能会遇到这个错误 [因为我遇到了,呵呵]:Permissions 0755 for "你配置的公钥文件路径" are too open.这个是因为这几个文件权限设置的有点问题执行命令: chmod 600 你的文件QT 4.5.2 嵌入式开发平台的搭建Ubuntu 10.10下安装Intel Fortran XE相关资讯 SSH
- SSH/SSL 源码编译安装简易操作说明 (今 07:03)
- Mac使用ssh出现permission denied( (03月23日)
- Mac OS X下配置远程Linux 服务器 (12/22/2015 15:21:41)
| - Teleport:面向集群及团队的 SSH (04月11日)
- 如何在 CentOS / RHEL 上设置 SSH (01月18日)
- SSH相互信任配置 (12/20/2015 19:58:17)
|
本文评论 查看全部评论 (0)