如何使用Linux內建的gssftp服務

來源:互聯網
上載者:User

對於剛剛接觸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來搭建。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.