1.开启FTP权限
修改/ect/inetd.conf,将ftp前面的#号去掉
# vi /etc/inetd.conf
- # $FreeBSD: src/etc/inetd.conf,v 1.73.10.2.4.1 2010/06/14 02:09:06 kensmith Exp $
- #
- # Internet server configuration database
- #
- # Define *both* IPv4 and IPv6 entries for dual-stack support.
- # To disable a service, comment it out by prefixing the line with '#'.
- # To enable a service, remove the '#' at the beginning of the line.
- #
- ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
修改/etc/rc.conf,添加
- inetd_enable="YES"
- ftpd_enable="YES"
启动inetd
- # /etc/rc.d/inetd start
新建一个用户,用来登录FTP
- # adduser
- Username: xiaoruoen
- Full name: xiaoruoen
- Uid (Leave empty for default):
- Login group [xiaoruoen]:
- Login group is xiaoruoen. Invite xiaoruoen into other groups? []:
- Login class [default]:
- Shell (sh csh tcsh nologin) [sh]:
- Home directory [/home/xiaoruoen]:
- Home directory permissions (Leave empty for default):
- Use password-based authentication? [yes]:
- Use an empty password? (yes/no) [no]:
- Use a random password? (yes/no) [no]:
- Enter password:
- Enter password again:
- Lock out the account after creation? [no]:
- Username : xiaoruoen
- Password : *****
- Full Name : xiaoruoen
- Uid : 1003
- Class :
- Groups : xiaoruoen
- Home : /home/xiaoruoen
- Home Mode :
- Shell : /bin/sh
- Locked : no
- OK? (yes/no): yes
- adduser: INFO: Successfully added (xiaoruoen) to the user database.
- Add another user? (yes/no): no
- Goodbye!
这里可以使用xiaoruoen这个帐户登录ftp了。
2.SSH配置
修改/etc/rc.conf
加上
- sshd_enable="YES"
FreeBSD默认是不允许使用root用户SSH登录的。要想使用root用户登录,修改
- # vi /etc/ssh/sshd_config
将PermitRootLogin前面的#号去掉,把no改成yes
PermitRootLogin yes
修改inetd.conf
# vi /etc/inetd.conf
将SSH前面的#号去掉,重启inetd
- # /etc/rc.d/inetd restart
用SecureCRT登录,如图
选择Keyboard Interactive,选择密码验证
登录成功后将出现
- Last login: Tue Apr 24 22:34:49 2012 from 192.168.5.24
- Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
- The Regents of the University of California. All rights reserved.
- FreeBSD 8.1-RELEASE (GENERIC) #0: Mon Jul 19 02:55:53 UTC 2010
- Welcome to FreeBSD!
- Before seeking technical support, please use the following resources:
- o Security advisories and updated errata information for all releases are
- at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
- for your release first as it's updated frequently.
- o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
- along with the mailing lists, can be searched by going to
- http://www.FreeBSD.org/search/. If the doc distribution has
- been installed, they're also available formatted in /usr/share/doc.
- If you still have a question or problem, please take the output of
- `uname -a', along with any relevant error messages, and email it
- as a question to the questions@FreeBSD.org mailing list. If you are
- unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
- manual page. If you are not familiar with manual pages, type `man man'.
- You may also use sysinstall(8) to re-enter the installation and
- configuration utility. Edit /etc/motd to change this login announcement.
联系客服