免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3724 | 回复: 6
打印 上一主题 下一主题

如何配置SSH密钥证书服务器? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-30 17:06 |只看该作者 |倒序浏览
如何配置SSH密钥证书服务器
目前有一台服务器LINUX9.0系统,采用SSH登陆,没有启动密钥证书服务,为了安全,现在想在服务器上启用密钥证书服务,看了好多资料还是没配置成功,

在原来的SSH没密钥的基础上还要怎么配置呢?
或者有没有配置过的,将过和和配置选项这些资料讲一下,万分感谢!

论坛徽章:
0
2 [报告]
发表于 2007-08-31 09:04 |只看该作者
目前有一台服务器LINUX9.0系统,采用SSH登陆,没有启动密钥证书服务,为了安全,现在想在服务器上启用密钥证书服务
问题可能在SSH配置文件中有问题?

配置如下,
一、生成密钥
#ssh-keygen -b 4096 -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
(密钥对将要存的路径,括号内为默认)
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
(输入口令)
Enter same passphrase again:
(再次输入口令)

执行命令后生成下面两人文件,一个是私钥、一个是公钥。
/root/.ssh/id_dsa.
(你的私钥)
/root/.ssh/id_dsa.pub.
(你的公钥)

二、配置SSH的配置文件,
----------------------
/etc/ssh/ssh_config
#配置ssh_config
#vi /etc/ssh/ssh_config
Host * 
ForwardAgent no 
ForwardX11 no 
RhostsAuthentication no 
RhostsRSAAuthentication no 
RSAAuthentication yes 
PasswordAuthentication yes 
FallBackToRsh no 
UseRsh no 
BatchMode no 
CheckHostIP yes 
StrictHostKeyChecking no 
IdentityFile ~/.ssh/identity 
Port 22 
Cipher blowfish 
EscapeChar ~ 
------------------
/etc/ssh/sshd_config
#vi /etc/ssh/sshd_config
Port 22 
ListenAddress 192.168.1.1 
HostKey /etc/ssh/ssh_host_key 
ServerKeyBits 1024 
LoginGraceTime 600 
KeyRegenerationInterval 3600 
PermitRootLogin no 
IgnoreRhosts yes 
IgnoreUserKnownHosts yes 
StrictModes yes 
X11Forwarding no 
PrintMotd yes 
SyslogFacility AUTH 
LogLevel INFO 
RhostsAuthentication no 
RhostsRSAAuthentication no 
RSAAuthentication yes 
PasswordAuthentication yes 
PermitEmptyPasswords no 
AllowUsers admin

三、将一个是私钥、一个是公钥。复制到客户端,用SecureCRT-v5.0软件到建立SSH链接一服务器。

论坛徽章:
0
3 [报告]
发表于 2007-08-31 15:50 |只看该作者
cat /root/.ssh/id_dsa.pub >/root/.ssh/authorized_keys
并把authorized_keys 文件放到所有服务器的/root/.ssh/下

论坛徽章:
0
4 [报告]
发表于 2007-09-01 15:01 |只看该作者
理解了。。复杂的,也就简单了。。

关键就是。把你的个人电脑也装成功之路LINUX的。。

论坛徽章:
0
5 [报告]
发表于 2007-09-03 09:42 |只看该作者
不安装成LINUX不行吗?因为客户端都是个人PC都是用WIN XP,用SecureCRT工具来建立链接的。

论坛徽章:
0
6 [报告]
发表于 2007-09-03 22:16 |只看该作者
windows用putty.

论坛徽章:
0
7 [报告]
发表于 2008-01-10 11:11 |只看该作者
是公钥复制到客户机还是私钥
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP