ftp:connect:未知錯誤號碼解決

來源:互聯網
上載者:User


ftp:connect:未知錯誤號碼解決 預設情況下不需要修改就可以在虛擬機器上訪問的,如: Python代碼  [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//匿名登入預設使用者名,密碼也是;也可都用anonymous    331 Please specify the password.    Password:    230 Login successful. //恭喜您,已成功登陸    Remote system type is UNIX.    Using binary mode to transfer files.    ftp>    www.2cto.com  Python代碼  [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//匿名登入預設使用者名,密碼也是;也可都用anonymous   331 Please specify the password.   Password:   230 Login successful. //恭喜您,已成功登陸   Remote system type is UNIX.   Using binary mode to transfer files.   ftp>    www.2cto.com  不過,先別高興太早,這隻是在本虛擬機器上可以訪問,在宿主機上呢,我用的是xp 通過cmd命令會出現如下錯誤  Python代碼  C:\Documents and Settings\Administrator>ftp 10.4.141.15    > ftp: connect :未知錯誤號碼   Python代碼  C:\Documents and Settings\Administrator>ftp 10.4.141.15   > ftp: connect :未知錯誤號碼    10.4.141.15是我的虛擬機器Linux的ip地址 當然此時要保證宿主機和虛擬機器能相互ping通! 針對這個錯誤,我們應該進行如下設定 將Linux的防火牆關掉,如下命令:   www.2cto.com  Python代碼  service iptables stop   Python代碼  service iptables stop    停掉防火牆以後還是不能訪問,此時我們就要考慮防火牆表面上關掉了,其實底部還有
某些驅動在運行,這就是我們的21連接埠還被防火牆限制訪問,所以我們要開放21連接埠,命令如下: iptables -A INPUT -p tcp -sport 21 -j ACCEPT iptables -A INPUT -p tcp -dport 21 -j ACCEPT  至此,我們就可以在用戶端訪問我們的sftpd服務了,剩下的設定就簡單了,存取權限之類的。 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.