ArchLinux上配置OpenSHH

1886阅读 0评论2009-05-09 yyt030
分类:LINUX

配置步骤基本如下:
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:配置完成!




上一篇:Archlinux下配置蓝牙
下一篇:关于unix_chkpwd错误的纠正