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使用调试方 ...
随机推荐
- linux-程序发布脚本
写了个启动程序, 调优jvm的脚本 #!/bin/bash MEM=`free -m | grep Mem | awk '{print int($2 * 90 / 100)}'` JAVA_OPTS= ...
- 《Netty权威指南》(三)Netty 入门应用
Netty 服务端 Netty 客户端
- SpringCloud入门之eclipse新建maven子项目和聚合项目
一.new maven project : next 二.勾选 create a simple project : next 三.Group Id:项目的包路径 如com.test,之后创建的C ...
- Tomcat学习总结(13)—— Tomcat常用参数配置说明
1.修改端口号 Tomcat端口配置在server.xml文件的Connector标签中,默认为8080,可根据实际情况修改. 修改端口号 2.解决URL中文参数乱码 在server.xml文件的Co ...
- Spring Boot(三):Spring Boot 中 Redis 的使用
Spring Boot 对常用的数据库支持外,对 Nosql 数据库也进行了封装自动化. Redis 介绍 Redis 是目前业界使用最广泛的内存数据存储.相比 Memcached,Redis 支持更 ...
- RocketMQ专题1:入门
RocketMQ入门 源码和应用下载 这里以RocketMQ的4.3.0版本为例,本地环境为windows10,jdk1.8, maven3.2.1. 源码下载地址: http://mirrors ...
- LINQ 图解 LINQ学习第三篇
LINQ,语言集成查询(Language INtegrated Query)是一组用于c#和Visual Basic语言的扩展.它允许编写C#或者Visual Basic代码以查询数据库相同的方式操作 ...
- VB.NET文件读写(C#可以改写)
VB.NET也可以用using 先FileStream,再StreamReader(写用StreamWriter) Using fs As New FileStream(p1, FileMode.Op ...
- 了解java虚拟机—非堆相关参数设置(4)
非堆内存相关配置 -XX:PermSize 永久区初始大小 -XX:MaxPermSize 永久区最大大小 在JDK1.8中使用-XX:MxMetaspaceSize配置永久区最大大小 -Xss 线程 ...
- K8s-Demo实现
Kubernates的基础界面 常用的操作 将创建好的yaml文件通过Create按钮创建所需资源项目. Dashbord: 可以通过Dashbord查看集群详情:cpu.memory.f ...