如何使用Linux自带的gssftp服务

系统 Linux
对于刚刚接触Linux操作系统的人,对于如何使用Linux自带的gssftp服务一定不怎么清楚。没关系,本篇文章便为大家解答如何使用这项服务。

对于刚刚接触Linux操作系统的人,对于如何使用Linux自带的gssftp服务一定不怎么清楚。没关系,本篇文章便为大家解答如何使用这项服务。

RedHat和CentOS都自带了一个gssftp服务,使用方式如下:

[root@linux local]# cd /etc/xinetd.d 
[root@linux xinetd.d]# ls 
chargen cups-lpd daytime-udp echo-udp gssftp krb5-telnet rsync time-udp 
chargen-udp daytime echo eklogin klogin kshell time

编辑gssftp文件,将server_args改为-l,将disable改为no:

[root@linux xinetd.d]# vi gssftp
[root@linux xinetd.d]# vi gssftp
# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
#server_args = -l -a
server_args = -l
log_on_failure += USERID
#disable = yes
disable = no
}

重启xinetd服务:

[root@linux xinetd.d]# service xinetd restart 
Stopping xinetd: [ OK ] 
Starting xinetd: [ OK ]

这时查看21端口已经打开:

[root@linux xinetd.d]# netstat -tnlp 
Active Internet connections (only servers) 
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 22543/xinetd

如果防火墙没有打开端口,则开放21端口并重启防火墙服务:

[root@linux xinetd.d]# vi /etc/sysconfig/iptables 
[root@linux xinetd.d]# service iptables restart 
Flushing firewall rules: [ OK ] 
Setting chains to policy ACCEPT: filter [ OK ] 
Unloading iptables modules: [ OK ] 
Applying iptables firewall rules: [ OK ]

这样ftp服务就可用了,可以使用linux系统用户登录,不过gssftp不够安全,临时应急或内部使用可以,稳定的FTP服务还是建议使用vsftp来搭建。

【编辑推荐】

  1. 雅虎、Iqalia加入Linux基金会
  2. 聚焦Linux合作峰会2011:五大议题
  3. Linux下利用ext3grep恢复被删除的文件
  4. Linux十大妙用:充当Windows修复工具
  5. Novell推出业界最长的企业级Linux支持项目
     

 

责任编辑:冯宇 来源: Linux社区
相关推荐

2020-12-29 05:34:48

Scrapy网页源代码

2017-08-11 18:25:25

Linuxi2c

2011-08-17 11:10:26

Win7问题步骤录制器

2015-08-05 09:35:38

Bastille服务器安全

2009-02-10 15:46:00

VNCLinux服务器远程桌面

2020-11-04 18:53:07

Linuxsystemctl运维

2015-11-26 10:53:45

LinuxWindowsMac OS

2010-08-03 15:37:43

Linux NFS服务

2020-05-22 15:45:30

Linuxlogrotate神器

2021-08-16 11:59:32

Linuxlogrotate日志文件

2013-12-03 11:01:41

Linux服务器管理Webmin

2012-07-31 17:24:50

Java管理Linux服务器

2018-11-19 09:50:51

Linux命令操作系统

2019-02-20 08:53:59

SFTPLinux服务器

2023-04-10 07:23:24

软件微服务网络

2021-03-17 07:29:15

Systemctl 管理Linux

2018-08-03 08:43:38

2013-12-30 16:27:43

Windows画图工具

2022-08-16 08:19:04

Sentinel微服务

2020-07-28 09:45:29

LinuxCaddyHTTPS
点赞
收藏

51CTO技术栈公众号