Linux installation connect to FTP

Reference URL: http://blog.csdn.net/hfw_1987/article/details/4370122

1.      Check if ftp is installed

The following prompt cannot recognize the service, indicating that the ftp service is not installed

[root@localhost root]# service vsftpd status

vsftpd: unrecognized service - indicates that FTP is not installed

Second,      install ftp

On the interface of the linux system, click the menu item " Main Menu System Settings Add or Remove Applications " , and in the " Software " that appears

In the " Package Management " dialog box, make sure the  "FTP Server" option is selected, and then click the " Update " button, as shown in the following figure:


Install after inserting the third disk

3.      After installation, check whether the installation is successful

The following prompts the vsftpd service to stop, indicating that the service is installed but not enabled

[root@localhost root]# service vsftpd status

vsftpd is stopped

 

Fourth,      start the service

[root@localhost root]# service vsftpd start

Starting vsftpd for vsftpd:[ OK ]                                

Check again and find that it is already in the startup state:

[root@localhost root]# service vsftpd status

vsftpd (pid 4510) is running...

 

Five,      modify the root user can use ftp

By default you cannot use ftp with root user , as follows:

C:\Users\thinkpad>ftp 192.168.141.123

Connect to  192.168.141.123 .

220 (vsFTPd 1.1.3)

user (192.168.141.123:(none)): root

530 Permission denied.

Login failed .

Modify the /etc/vsftpd.ftpuusers file, which records users who cannot use ftp to log in, and comment the root user

Modify the /etc/vsftpd.user_list file and comment the root user.

 

说明:/etc/vsftpd.user_list文件与/etc/vsftpd/vsftpd.conf文件有关联,如果/etc/vsftpd/vsftpd.conf文件中的userlist_enable=YES(这也是默认情况下的设置),那么在/etc/vsftpd.user_list文件中列出的用户就不能使用ftp

六、     开机自动启动ftp服务

chkconfig vsftpd on

 

 

===============================================================================

问题描述:

可以使用xshell连接至服务器但无法使用xftp连接至服务器。

解决方案:

  • 因为一般服务器的禁止root用户以ftp,sftp方式登录服务器。因此打开服务器端(linux)的root账号登陆ftp,sftp权限:
cd /etc/vsftpd/ #如果没有这个文件夹,就安装vsftpd服务
ls
vim ftpuser
  • 1
  • 2
  • 3

安装vsftpd服务使用:yum install vsftpd

  • 检查下win的FTP服务是否开启: 
    控制面板—程序—打开或关闭windows功能—找到Internet information service——打开该选项卡——选中(打开)FTP服务器相关功能

  • 端口号改为22

 

如果还不行,换SFTP服务试试

 

=============================================

最后通过 xftp工具来连接ftp 连接时选择SFTP方式连接

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326552862&siteId=291194637