Chinaunix首页 | 论坛 | 博客
  • 博客访问: 24633
  • 博文数量: 12
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 95
  • 用 户 组: 普通用户
  • 注册时间: 2014-10-28 14:12
文章分类
文章存档

2015年(6)

2014年(6)

我的朋友

分类: LINUX

2015-01-07 16:04:59

[root@localhost sbin]# ssh-keygen -t rsa
Generating 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:
88:8d:6d:2e:fb:a4:ff:a4:17:32:5e:6b:bc:c3:c0:1e root@localhost.localdomain
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|     = .         |
|    o.= S        |
|     oE o        |
|    .ooO.o       |
|     =ooB        |
|    oo++oo       |
+-----------------+
[root@localhost sbin]# cd ~/.ssh
[root@localhost .ssh]# ls
id_rsa  id_rsa.pub  known_hosts
[root@localhost .ssh]# cat id_rsa.pub >> ~/.ssh/authorized_keys
[root@localhost .ssh]# ssh localhost
Last login: Wed Jan  7 15:57:16 2015 from localhost
[root@localhost ~]# exit
logout
Connection to localhost closed.
阅读(514) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~