Chinaunix首页 | 论坛 | 博客
  • 博客访问: 124259
  • 博文数量: 22
  • 博客积分: 948
  • 博客等级: 准尉
  • 技术积分: 225
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-08 15:50
文章分类

全部博文(22)

文章存档

2015年(1)

2013年(1)

2010年(1)

2009年(19)

我的朋友

分类: LINUX

2009-05-09 22:45:43

配置步骤基本如下:
1:安装OpenSHH软件:
     pacman -Ss openssh
2:配置相应的/etc/sshd_config配置文件,其中:
A: 密码验证方式;
         使用这种连接主机的方式,需要将配置文件中的
PasswordAuthentication yes
打开
B:RSA公私密钥方式;
         使用这种方式,需要首先生成相应的公私密钥:
ssh-keygen
         生成的公钥(id_rsa.pub)和密钥(id_rsa.pub)位于~/.ssh/目录下。
将id_rsa.pub拷贝到Server机的~目录下;rename 成authorized_keys文件;
其次,更改sshd_config配置:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile    .ssh/authorized_keys

不管使用那种连接方式,都需要打开Server端的allow 列表;
   打开Server 端的hosts.allow
如:我的hosts.allow和hosts.deny文件如下:
-------------------------
#
# /etc/hosts.allow
#
sshd: [Client_HostName or Client IP]
# End of file
----------------------------
#
# /etc/hosts.deny
#
ALL: ALL: DENY
# End of file

3:启动Demon:
/etc/rc.d/sshd start
4:配置完成!




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