标签 ssh 下的文章

编辑 /etc/ssh/sshd_config 文件

在末尾增加两行
ClientAliveInterval 30
ClientAliveCountMax 3

重启ssh服务
/etc/init.d/ssh restart

首先编辑 /etc/inetd.conf
去掉 #ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 该行前面的#号
保存该文档

开机启动ssh服务

编辑 /etc/rc.conf 在末端增加一行
sshd_enable="yes"
保存该文档

允许root直接远程登录
编辑 /etc/ssh/sshd_config
搜索 PermitRootLogin 将该行注释的#去掉 并把no改成 yes

启动服务即可使用ssh客户端登录
/etc/rc.d/sshd start