打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
FreeBSD FTP与SSH设置

1.开启FTP权限

修改/ect/inetd.conf,将ftp前面的#号去掉

# vi /etc/inetd.conf 

  1. # $FreeBSD: src/etc/inetd.conf,v 1.73.10.2.4.1 2010/06/14 02:09:06 kensmith Exp $ 
  2. # Internet server configuration database 
  3. # Define *both* IPv4 and IPv6 entries for dual-stack support. 
  4. # To disable a service, comment it out by prefixing the line with '#'. 
  5. # To enable a service, remove the '#' at the beginning of the line. 
  6. ftp     stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l 

修改/etc/rc.conf,添加

  1. inetd_enable="YES" 
  2. ftpd_enable="YES" 

启动inetd

  1. # /etc/rc.d/inetd start 

新建一个用户,用来登录FTP

  1. # adduser 
  2. Username: xiaoruoen 
  3. Full name: xiaoruoen 
  4. Uid (Leave empty for default):  
  5. Login group [xiaoruoen]:  
  6. Login group is xiaoruoen. Invite xiaoruoen into other groups? []:  
  7. Login class [default]:  
  8. Shell (sh csh tcsh nologin) [sh]:  
  9. Home directory [/home/xiaoruoen]:  
  10. Home directory permissions (Leave empty for default):  
  11. Use password-based authentication? [yes]:  
  12. Use an empty password? (yes/no) [no]:  
  13. Use a random password? (yes/no) [no]:  
  14. Enter password:  
  15. Enter password again:  
  16. Lock out the account after creation? [no]:  
  17. Username   : xiaoruoen 
  18. Password   : ***** 
  19. Full Name  : xiaoruoen 
  20. Uid        : 1003 
  21. Class      :  
  22. Groups     : xiaoruoen  
  23. Home       : /home/xiaoruoen 
  24. Home Mode  :  
  25. Shell      : /bin/sh 
  26. Locked     : no 
  27. OK? (yes/no): yes 
  28. adduser: INFO: Successfully added (xiaoruoen) to the user database. 
  29. Add another user? (yes/no): no 
  30. Goodbye! 

这里可以使用xiaoruoen这个帐户登录ftp了。

2.SSH配置

修改/etc/rc.conf

加上

  1. sshd_enable="YES" 

FreeBSD默认是不允许使用root用户SSH登录的。要想使用root用户登录,修改

  1. # vi /etc/ssh/sshd_config  

将PermitRootLogin前面的#号去掉,把no改成yes

PermitRootLogin yes

修改inetd.conf

# vi /etc/inetd.conf 

将SSH前面的#号去掉,重启inetd

  1. # /etc/rc.d/inetd restart  

用SecureCRT登录,如图

选择Keyboard Interactive,选择密码验证

登录成功后将出现

  1. Last login: Tue Apr 24 22:34:49 2012 from 192.168.5.24 
  2. Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 
  3.         The Regents of the University of California.  All rights reserved. 
  4.  
  5. FreeBSD 8.1-RELEASE (GENERIC) #0: Mon Jul 19 02:55:53 UTC 2010 
  6.  
  7. Welcome to FreeBSD! 
  8.  
  9. Before seeking technical support, please use the following resources: 
  10.  
  11. o  Security advisories and updated errata information for all releases are 
  12.    at http://www.FreeBSD.org/releases/ - always consult the ERRATA section 
  13.    for your release first as it's updated frequently. 
  14.  
  15. o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, 
  16.    along with the mailing lists, can be searched by going to 
  17.    http://www.FreeBSD.org/search/.  If the doc distribution has 
  18.    been installed, they're also available formatted in /usr/share/doc. 
  19.  
  20. If you still have a question or problem, please take the output of 
  21. `uname -a', along with any relevant error messages, and email it 
  22. as a question to the questions@FreeBSD.org mailing list.  If you are 
  23. unfamiliar with FreeBSD's directory layout, please refer to the hier(7) 
  24. manual page.  If you are not familiar with manual pages, type `man man'. 
  25.  
  26. You may also use sysinstall(8) to re-enter the installation and 
  27. configuration utility.  Edit /etc/motd to change this login announcement. 
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
FreeBSD FTP 的架設
FreeBSD6.2架设之服务器基础配置
FreeBSD下SSH安装配置
FreeBSD中Samba Server 安装及配置
linux之kali系统ssh服务开启自启动
freebsd安装图解
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服