Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2314990
  • 博文数量: 141
  • 博客积分: 3552
  • 博客等级: 中校
  • 技术积分: 4148
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-15 14:39
个人简介

熟悉Linux下程序设计及各种应用程序 熟悉C Language 熟悉Glusterfs、FFmpeg、CDN 系统设计,计算机图形系统设计、分布式程序设计 目前主要研究方向:流媒体

文章分类

全部博文(141)

分类: BSD

2009-11-14 16:15:31

Using username "root".
Authenticating with public key "imported-openssh-key"
Passphrase for key "imported-openssh-key":
Last login: Mon Nov 9 09:54:25 2009 from 192.168.3.135
OpenBSD 4.6 (GENERIC) #58: Thu Jul 9 21:24:42 MDT 2009

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

10:11AM up 42 mins, 3 users, load averages: 0.12, 0.09, 0.08
USER TTY FROM LOGIN@ IDLE WHAT
root C0 - 9:29AM 20 -bash
root p0 192.168.3.135 9:50AM 0 -bash
root p1 192.168.3.135 10:11AM 0 w
   November 2009
Su Mo Tu We Th Fr Sa
 1 2 3 4 5 6 7
 8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

[root@liuqi ~]#

用证书登陆

首先生成一个公钥和一个私钥

[root@liuqi ~]#ssh-keygen -b 1024 -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
ba:71:52:87:11:cd:74:8a:bc:91:ba:a3:51:af:95:77 root@liuqi.cutbag
The key

然后做一个ssh服务端的公钥证书

cat id_rsa.pub > authorized_keys

接着配置一下ssh服务配置文件/etc/ssh/sshd_config

把如下几句注释掉的内容打开


RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

然后将私钥id_rsa文件copy到windows里,把内容copy到一个新的文本文件里。

然后在windows下用puttygen生成新文件,就可以了

阅读(4044) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~