Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Windows terminals use FTP to access Linux

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how the Windows terminal uses FTP to access Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

In many large-scale enterprise geographic database construction, the servers are generally Linux, AIX, Solaris and other operating systems. In general, users use Windows terminals to access these operating systems, including command line terminals, file transfer software, common including Putty, SSH, Xmanager and so on. According to each user's preconception, usually which one is learned first, they are more accustomed to the software. But often the situation is very different when you go to the customer's side, it is possible that the tools you are used to have not been installed at all, so if you encounter an unfamiliar environment, you will be stretched to master only one skill.

This time I encountered a problem, I am used to using putty+SSH software, I hope to get the DMP files exported by the user's AIX operating system and copy them to my Windows operating system for testing, but if the DMP is not exported in accordance with the Binary mode, the DMP cannot be used in my operating system, and there is only Xmanager on the user's side, which I am not used to, so using FTP transport is a good solution.

Using FTP, you can directly set to download to the user locally in the way of Binary, which is very convenient.

1. Make sure VSFTPD is installed in the operating system.

You can verify using the following command line:

[root@sdemachine3 ~] # cd / etc/vsftpd [root@sdemachine3 vsftpd] # ls ftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh [root@sdemachine3 vsftpd] #

If it is not installed, you can download the relevant Tar package and install it. Vsftpd.conf includes settings for the configuration parameters of the FTP service.

2. Make sure that the server FTP service is enabled.

[root@sdemachine3 vsftpd] # service vsftpd status vsftpd is stopped [root@sdemachine3 vsftpd] # service vsftpd start Starting vsftpd for vsftpd: [OK]

3: it is recommended that the firewall or SELinux of the server be turned off, or port 21 be open.

4: use the CMD of Windows for FTP connection.

FTP server IP address:

C:\ Users\ Administrator > ftp 192.168.220.133 connects to 192.168.220.133. (vsFTPd 2.2.2) user (192.168.220.133: (none)): root 331 Please specify the password. Password: 230 Login successful.

5: after the connection is successful, you can enter a similar command

The ftp > help command may be abbreviated. The command is:! Delete literal prompt send? Debug ls put status append dir mdelete pwd trace ascii disconnect mdir quit type bell get mget quote user binary glob mkdir recv verbose bye Hash mls remotehelp cd help mput rename close lcd open rmdirftp > dir 200PORT command successful. Consider using PASV. 425 Failed to establish connection.

It is recommended that you turn off the firewall of the Windows operating system to solve the press problem.

6. Command introduction

When disconnected, you can use the Open command to reconnect, or you can use the User command to continue connecting. The IP,DIR command is similar to DOS's list of all directory files, similar to Linux's ls command:

Ftp > dir remote host closes the connection. Ftp > open to 192.168.220.133 connect to 192.168.220.133. (vsFTPd 2.2.2) user (192.168.220.133: (none)): root 331 Please specify the password. Password: 230 Login successful. Ftp > dir 200PORT command successful. Consider using PASV. 150 Here comes the directory listing. Drwxr-xr-x 20 0 4096 Aug 29 2013 Desktop drwxr-xr-x 20 0 4096 Aug 29 2013 Documents drwxr-xr-x 20 0 4096 Aug 29 2013 Downloads drwxr-xr-x 20 0 4096 Aug 29 2013 Music drwxr-xr-x 20 0 4096 Aug 29 2013 Pictures drwxr-xr-x 20 0 4096 Aug 29 2013 Public drwxr-xr-x 200 4096 Aug 29 2013 Templates drwxr-xr-x 200 4096 Aug 29 2013 Videos-rw- 100 3135 Aug 29 2013 anaconda-ks.cfg-rw-r--r-- 100 2062384 Jan 02 05:54 ceshi_ora_11016. Trc-rw-r--r-- 100 14415564 Jan 02 06:51 ceshi_ora_11620.trc drwxr-xr-x 18 4096 Mar 05 02:12 gdal-1.9.2-rw-r--r-- 100 11532797 Mar 05 01:50 gdal192.zip-rw-r--r-- 100 59875 Aug 29 2013 install .log-rw-r--r-- 9548 Aug 29 2013 install.log.syslog drwxr-xr-x 200 4096 Mar 06 02:44 shp_data1-rwxr-xr-x 100701 Feb 27 03:34 test.pl test.pl. Ftp: received 1164 bytes and took 0.06 seconds 18.77 kilobytes per second.

Check the status Status and focus on the type ascii, that is, the transmitted data is in the form of ascii code:

Ftp > status connects to 192.168.220.133. Type: ascii; details: on; ringtone: off; prompt: on; wildcard: on and off; hash mark printing: off.

If you want the user to transfer using binary, for example, after the above dir, there is a test.pl file in the root directory of the root, I want to pass it to the Windows terminal in binary form. Use FTP to get the file using the get command:

Ftp > binary 200Switching to Binary mode. Ftp > get test.pl 200PORT command successful. Consider using PASV. 150 Opening BINARY mode data connection for test.pl (701 bytes). 226 Transfer complete. Ftp: received 701 bytes, 701000.00 kilobytes per second in 0.00 seconds.

The mget command gets more than one remote file at a time.

The general format of the mget command is: list of mget file names

Use a space-delimited or wildcard list of file names to specify the files to get, and for each of these files, the user is asked to confirm whether or not to transfer. The obtained test.pl file is in the folder entered by the default command line, that is, the C:\ Users\ Administrator folder.

C:\ Users\ Administrator > ftp 192.168.220.133

Using the send command, pass the local file to the target server:

Ftp > send test1.pl 200PORT command successful. Consider using PASV. 150 Ok to send data. 226 Transfer complete. Ftp: send 701bytes in 0.00s 701.00 kilobytes per second. Ftp > dir 200PORT command successful. Consider using PASV. 150 Here comes the directory listing. Drwxr-xr-x 20 0 4096 Aug 29 2013 Desktop drwxr-xr-x 20 0 4096 Aug 29 2013 Documents drwxr-xr-x 20 0 4096 Aug 29 2013 Downloads drwxr-xr-x 20 0 4096 Aug 29 2013 Music drwxr-xr-x 20 0 4096 Aug 29 2013 Pictures drwxr-xr-x 20 0 4096 Aug 29 2013 Public drwxr-xr-x 200 4096 Aug 29 2013 Templates drwxr-xr-x 200 4096 Aug 29 2013 Videos-rw- 100 3135 Aug 29 2013 anaconda-ks.cfg-rw-r--r-- 100 2062384 Jan 02 05:54 ceshi_ora_ 11016.trc-rw-r--r-- 100 14415564 Jan 02 06:51 ceshi_ora_11620.trc drwxr-xr-x 18 4096 Mar 05 02:12 gdal-1.9.2-rw-r--r-- 100 11532797 Mar 05 01:50 gdal192.zip-rw-r--r-- 100 0 59875 Aug 29 2013 install.log-rw-r--r-- 100 9548 Aug 29 2013 install.log.syslog drwxr-xr-x 200 4096 Mar 06 02:44 shp_data1-rwxr-xr-x 100701 Feb 27 03:34 test.pl-rw-r--r-- 100701 Apr 18 01:38 test1.pl 226Directory send OK. Ftp: received 1230 bytes and took 0.01s 94.62 kilobytes per second.

You can also use the Put command, which is similar to send.

The put and mput commands are used to send files to the remote machine

The general format of the Put command is: put file name

The mput command sends multiple local files at a time

The general format of the mput command is: list of mput file names

Use a space-delimited or wildcard list of file names to specify the file to send. The user is asked to confirm whether to send each of these files. Use the cd command to change the directory of the target server:

Ftp > cd / home/oracle 250Directory successfully changed. Ftp > dir 200PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rw-r--r-- 1500501 1170432000 Jan 14 01:01 DBCGW.DMP drwxrwxr-x 9500501 4096 Jan 14 01:07 apache-tomcat-7.0.42 drwxrwxr-x 4500501 4096 Sep 09 2013 app-rwxrwxr-x 1500501 493 Jan 14 01:03 export.log-rwxrwxr-x 1500501 1402 Jan 14 01:04 import.log Drwxr-xr-x 6 500 501 4096 Nov 29 08:24 sdeexe102 226 Directory send OK. Ftp: received 411 bytes and used 0.01s 29.36kbytes per second.

If you do not want the local default path to be C:\ Users\ Administrator and want to change it to C:\ as the default path, use the lcd command to modify it.

Ftp > lcd c:\ the current local directory C:\. The above is all the contents of the article "how to use FTP to access Linux in Windows terminals". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report