1、安装时选择上 SSH,或者源码安装 SSH
2、使用 root 登陆系统
3、使用 ee 编辑器编辑
ee /etc/inetd.conf
去掉 ssh 前的 #,
按 ctrl+c ,再输入 exit 保存退出
4、编辑
ee /etc/rc.conf
# 添加一行
sshd_enable="YES"
5、编辑
ee /etc/ssh/sshd_config
# PermitRootLogin no 改为 PermitRootLogin yes
//允许root登陆
# PasswordAuthentication no 改为 PasswordAuthentication yes
//使用系统PAM认证
# PermitEmptyPasswords no 改为 PermitEmptyPasswords yes
//不允许空密码
#port=22
保存退出
6、启动 SSHD 服务,
/etc/rc.d/sshd restart
7、查看服务是否启动,
netstat -an
如果看到22端口有监听,恭喜!!!