前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >为ssh加个证书

为ssh加个证书

作者头像
用户3765803
发布2019-03-05 10:16:08
7350
发布2019-03-05 10:16:08
举报
文章被收录于专栏:悟空被FFmpeg玩

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.135OpenBSD 4.6 (GENERIC) #58: Thu Jul 9 21:24:42 MDT 2009Welcome 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 latestversion of the code. With bug reports, please try to ensure thatenough information to reproduce the problem is enclosed, and if aknown fix for it exists, include that as well.10:11AM up 42 mins, 3 users, load averages: 0.12, 0.09, 0.08USER TTY FROM LOGIN@ IDLE WHATroot C0 - 9:29AM 20 -bashroot p0 192.168.3.135 9:50AM 0 -bashroot p1 192.168.3.135 10:11AM 0 w   November 2009Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 1415 16 17 18 19 20 2122 23 24 25 26 27 2829 30[root@liuqi ~]#

用证书登陆

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

[root@liuqi ~]#ssh-keygen -b 1024 -t dsaGenerating 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.cutbagThe key

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

cat id_rsa.pub > authorized_keys

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

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

RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys

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

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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2009/11/14 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
全站加速网络
全站加速网络(Enterprise Content Delivery Network,以下简称 ECDN)为您提供稳定高效的网络加速服务,适用于动静混合、纯动态、跨国、上传等多种加速场景。ECDN 网络资源丰富,同时融合静态缓存、智能路由、协议优化、多路传输、抗抖动等自研技术,加速效果更加显著;接入便捷,功能配置灵活多样,可满足您个性化的业务需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档