install openssh on archlinux
Sunday September 2, 2007经朋友推荐,决定尝试下 archlinux
系统安装参考 archlinux wiki 中的 Beginners Guide
网络配置参考 Configuring network
主要配置 /etc/rc.conf 和 /etc/resolv.conf 两个文件, 不多言
配置好后
#pacman -Syu #更新系统
鉴于官方wiki并未给出ssh的安装和配置方法,所以我决定自己写了一个备忘
安装ssh
# pacman -Sy openssh
配置/etc/rc.conf
向 DAEMONS 一行中的 netfs 后添加 sshd
DAEMONS=(syslog-ng network netfs sshd crond) #作用是在archlinux系统启动时自动加载sshd
如果你想通过主机名访问某台电脑,配置/etc/hosts
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 localhost.localdomain localhost
192.168.0.120 computer1.localdomain computer1
192.168.0.121 computer2.localdomain computer2
192.168.0.122 computer3.localdomain computer3
192.168.0.123 computer4.localdomain computer4
192.168.0.124 computer5.localdomain computer5
192.168.0.125 computer6.localdomain computer6
# End of file
有两个文件控制别人访问我的电脑的权限, /etc/hosts.deny 和 /etc/hosts.allow
查看/etc/hosts.deny 和 /etc/hosts.allow
#
# /etc/hosts.deny
#
ALL: ALL: DENY
# End of file
#
# /etc/hosts.allow
#
# End of file
如果你想让某人通过ssh访问你的电脑,可以进行入下配置
#
# /etc/hosts.allow
#
#sshd: ALL: ALLOW #允许所有电脑访问,不推荐这样做
sshd: 192.168.0.15: ALLOW #允许ip为192.168.0.15的电脑通过ssh访问
# End of file
配置/etc/ssh/sshd_config
参考 此文
重启ssh
# /etc/rc.d/sshd start
ok
