Ftp: connect: Unknown error code resolved

Source: Internet
Author: User


Ftp: connect: Unknown error codes can be accessed on virtual machines without modification by default, for example: python code [root @ tong vsftpd] # ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1 ). 220 (vsFTPd 2.1.2) Name (127.0.0.1: tong): ftp // default username for anonymous logon. the password is the same. You can also use anonymous 331 Please specify the password. password: 230 Login successful. // congratulations, you have successfully logged on to Remote system type is UNIX. using binary mode to transfer files. ftp> www.2cto.com Python code [root @ tong vsftpd] # ftp 127.0.0. 1 Connected to 127.0.0.1 (127.0.0.1 ). 220 (vsFTPd 2.1.2) Name (127.0.0.1: tong): ftp // default username for anonymous logon. the password is the same. You can also use anonymous 331 Please specify the password. password: 230 Login successful. // congratulations, you have successfully logged on to Remote system type is UNIX. using binary mode to transfer files. ftp> www.2cto.com but don't be too happy. It's only accessible on this virtual machine. On the host machine, I use xp and run the cmd command to see the following error: Python code C: \ Documents and Settings \ Administrator> ftp 10.4.141.15> ftp: c Onnect: Unknown error code Python C: \ Documents ents and Settings \ Administrator> ftp 10.4.141.15> ftp: connect: unknown error number 10.4.141.15 is the IP address of my virtual machine Linux. Of course, at this time, ensure that the host machine and virtual machine can ping each other! In response to this error, we should make the following settings to turn off the firewall of Linux, the following command: www.2cto.com Python code service iptables stop to stop the firewall and still cannot be accessed, at this point, we should consider that the firewall is turned off on the surface. In fact, there are still
Some drivers are running. This means port 21 is restricted by the firewall, so we need to open port 21. The command is as follows: iptables-a input-p tcp-sport 21-j ACCEPT iptables-a input-p tcp-dport 21-j ACCEPT now, we can access our sftpd service on the client, the remaining settings are simple, such as access permissions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.