FTP 命令的使用
最近需要使用 ftp 工具,所以借此机会来进行整理以下具体的内容:
具体什么是ftp, ftp 能干什么?
请参考:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/s1-ftp
http://cn.linux.vbird.org/linux_server/0410vsftpd.php
重点理解:主动联机 与 被动联机 两种模式中,端口的选择。

主动连接
active mode
FTP protocol for transferring data to the client application. When an active-mode data transfer is initiated by the FTP client, the server opens a connection from port 20 on the server to the IP address and a random, unprivileged port (greater than 1024) specified by the client. This arrangement means that the client machine must be allowed to accept connections over any port above 1024. With the growth of insecure networks, such as the Internet, the use of firewalls for protecting client machines is now prevalent. Because these client-side firewalls often deny incoming connections from active-mode FTP servers, passive mode was devised.
被动连接
passive mode
FTP client application. When requesting data from the server, the FTP client indicates it wants to access the data in passive mode and the server provides the IP address and a random, unprivileged port (greater than 1024) on the server. The client then connects to that port on the server to download the requested information.FTP server. This also simplifies the process of configuring firewall rules for the server.➜ Desktop yum search vsftpd
Last metadata expiration check: days, :: ago on Tue Jun :: PM CST.
================================================== Name Exactly Matched: vsftpd ==================================================
vsftpd.x86_64 : Very Secure Ftp Daemon
vsftpd 全称为: Very Secure Ftp Daemon
vsftpd 配置文件:我们可以使用 man 5 vsftpd.conf 命令,来查找vsftpd 的配置说明。
FTP 连接与命令:
1. 登录
[root@dhcp-- ~]# ftp localhost
Trying ::...
Connected to localhost (::).
Welcome to blah FTP service.
Name (localhost:root): yaowen
Please specify the password.
Password:
Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
Entering Extended Passive Mode (||||)
Here comes the directory listing.
drwxr-xr-x Jun : Desktop
drwxr-xr-x Jun Documents
drwxr-xr-x May : Downloads
drwxrwxr-x Jun : ISO
drwxr-xr-x Jun : NFS4
drwxr-xr-x Jun Pictures
drwxr-xr-x Jun Public
drwxr-xr-x Jun Templates
drwxr-xr-x Jun Videos
Directory send OK.
ftp>
2. 如果没有ftp 命令,则进行安装
[root@yaowenxu Desktop]# yum install ftp
3. ftp 支持的命令
使用 help 或者 ? 来进行查看当前服务所支持的命令
ftp> ?
Commands may be abbreviated. Commands are: ! debug mdir sendport site
$ dir mget put size
account disconnect mkdir pwd status
append exit mls quit struct
ascii form mode quote system
bell get modtime recv sunique
binary glob mput reget tenex
bye hash newer rstatus tick
case help nmap rhelp trace
cd idle nlist rename type
cdup image ntrans reset user
chmod lcd open restart umask
close ls prompt rmdir verbose
cr macdef passive runique ?
delete mdelete proxy send
我们可以使用 ftp 利用交互式的方式来进行与 ftpd 服务器来进行交互。
我们 可以使用 get 下载文件,使用 put 上传文件;
使用 lcd 确定本地文件夹,使用pwd 确定服务器文件夹。
保持更新,转载请注明出处。
FTP 命令的使用的更多相关文章
- linux系统ftp命令
先来一段简单的ftp 下载脚本 ftp -i -n<<EOF open 14.2.33.211 user etl etl cd /etlfile/ftpfile lcd /etlfile/ ...
- Linux服务器ftp命令找不到
ftp commond not find 先用命令rpm -q vsftpd检查是否安装了ftp服务器 若显示vsftpd-2.2.2-11.el6_4.1.x86_64这样的信息,说明FTP服务器已 ...
- FTP命令
linux下常用FTP命令 1. 连接ftp服务器 1. 连接ftp服务器 格式:ftp [hostname| ip-address]a)在linux命令行下输入: ftp 192.168.1.1 ...
- windows下ftp命令大全
FTP Server: home4u.at.china.com User: yepanghuang Password: abc123 打开Windows的开始菜单,执行“运行”命令,在对话框中输入ft ...
- 通过FTP命令上传下载
用命令如何把自己电脑上的文件上传到被入侵的电脑上呢.方法有很多.用ftp是个不错的选择.方法如下 echo open 你的ftpip >ftp.txt echo user >>f ...
- linux ftp命令(转)
此命令需要安装ftp, yum install ftp 1. 连接ftp服务器 格式:ftp [hostname| ip-address]a)在linux命令行下输入: ftp 192.168.1.1 ...
- 详述Linux ftp命令的使用方法
转自:http://os.51cto.com/art/201003/186325.htm ftp服务器在网上较为常见,Linux ftp命令的功能是用命令的方式来控制在本地机和远程机之间传送文件,这里 ...
- 利用windows系统ftp命令编写的BAT文件上传[转]
利用windows系统ftp命令编写的BAT文件上传[转] 利用windows系统ftp命令编写的BAT文件上传[转] 在开发中往往需要将本地的程序上传到服务器,而且用惯了linux命令的人来说.在w ...
- ftp命令和scp命令
ftp命令: 服务器有安装ftp Server,另外一台linux可以使用ftp的client程序来进行文件的拷贝读取和下载. 1. 连接ftp服务器 格式:ftp [hostname| ip-ad ...
- FTP命令详解
FTP的命令行格式为:ftp -v -d -i -n -g [主机IP或者主机名],其中 -v显示远程服务器的所有响应信息: -n限制ftp的自动登录,即不使用: .n etrc文件: -d使用调试方 ...
随机推荐
- IDA动态调试so文件出现SIGILL
用ida6.6 调试android的so文件时经常会报SIGILL的错误,意思是指令非法.而且这种错误基本都是发生在系统函数内部,像我遇到过的mmap,fopen,fgets等等.在这些函数内部如果用 ...
- python学习: 优秀Python学习资源收集汇总--转
Python是一种面向对象.直译式计算机程序设计语言.它的语法简捷和清晰,尽量使用无异义的英语单词,与其它大多数程序设计语言使用大括号不一样,它使用縮进来定义语句块.与Scheme.Ruby.Perl ...
- 如何从GitHub迁移到GitLab?
如何从GitHub迁移到GitLab? 在本文中,我们将解释如何从Github迁移到Gitlab,同时我们也将解释如何将Github的开源项目导入到Gitlab. 正如你可能非常清楚的那样, Gitl ...
- Git学习笔记3
git checkout 命令git checkout -- readme.txt意思就是,把readme.txt文件在工作区的修改全部撤销,这里有两种情况: 一种是readme.txt自修改后还没有 ...
- HTTPS知识小结
HTTPS知识小结 背景1:TCP握手 internet上的两台机器A,B要建立起HTTP连接了,在这之前要先建立TCP连接,情景大概是这样子的: A:你好,我跟你建立一个TCP好吗? B:好啊. A ...
- http server 简单实现
本blog主要是模仿http server的实现,使得客户端使用浏览器访问server所指定的目录. 当访问的为一个目录时, 则列出改目录下的所有文件 当访问的是文件时,则下载文件到本地 本log仅仅 ...
- 乐字节-Java8新特性之方法引用
上一篇小乐介绍了<Java8新特性-函数式接口>,大家可以点击回顾.这篇文章将接着介绍Java8新特性之方法引用. Java8 中引入方法引用新特性,用于简化应用对象方法的调用, 方法引用 ...
- SQl语句查询性能优化
[摘要]本文从DBMS的查询优化器对SQL查询语句进行性能优化的角度出发,结合数据库理论,从查询表达式及其多种查询条件组合对数据库查询性能优化进行分析,总结出多种提高数据库查询性能优化策略,介绍索引的 ...
- SpringBoot结合Swagger2自动生成api文档
首先在pom.xml中添加如下依赖,其它web,lombok等依赖自行添加 <dependency> <groupId>io.springfox</groupId> ...
- eclipse java web项目经常自动调试进入debug模式
今天在运行Javaweb项目时,程序运行运行着就自动调试进入ThreadpoolExecutor,看着非常影响心情.最后在网上搜解决方法最后找到原因,解决方法如下. Window——>Prefe ...