FreeBSD SSH配置详解
1.首先vi编辑/etc/inetd.conf,去掉ssh前的#,保存退出
2.编辑/etc/rc.conf
最后加入:sshd_enable="yes"即可
3.激活sshd服务:
#/etc/rc.d/sshd start
用下面命令检查服务是否启动,在22端口应该有监听。
#netstat -an
4.vi /etc/ssh/sshd_config,
下面是配置文档:(/etc/ssh/sshd_config)
####################################################
# $OpenBSD: sshd_config,v 1.72 2005/07/25 11:59:40 markus Exp $
# $FreeBSD: src/crypto/openssh/sshd_config,v 1.42.2.1 2005/09/11 16:50:35 des Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
# Note that some of FreeBSD’s defaults differ from OpenBSD’s, and
# FreeBSD has a few additional options.
#VersionAddendum FreeBSD-20050903
#Port 22
Subsystem sftp /usr/libexec/sftp-server
IgnoreRhosts yes
IgnoreUserKnownHosts yes
PrintMotd yes
StrictModes no
RSAAuthentication yes
PermitRootLogin yes #允许root登录
PermitEmptyPasswords no #不允许空密码登录
PasswordAuthentication yes # 配置是否使用口令验证。
##############################################
(注:用查找发只修改上面#后面有汉字说明的3个地方,其他的都按照配置来
记得修改完配置文档后,重新启动sshd服务器即可。
5.#/etc/rc.d/sshd restart
6.在windows下使用SecureCRT来进行连接就可以连接上了。。同时用SecureFx也可以传输文件了。。
阅读(2252) | 评论(0) | 转发(0) |