windows上的文件通过FTP服务传送到solaris主机上

目标:将windows上的文件通过FTP服务传送到solaris主机上

[root@solaris186:/]# svcs ftp                              //查看ftp服务是否启动
STATE          STIME    FMRI
disabled       15:03:19 svc:/network/ftp:default   //ftp服务实例处于禁用状态且尚未运行
[root@solaris186:/]# svcadm enable ftp             //开启ftp服务
[root@solaris186:/]# svcs ftp                              //查看ftp服务是否启动
STATE          STIME    FMRI
online         15:25:50 svc:/network/ftp:default     //ftp服务实例处于启用状态,并且已成功启动
[root@solaris186:/]# vi /etc/ftpd/ftpusers            //屏蔽root用户的ftp访问
"/etc/ftpd/ftpusers" 19 lines, 198 characters
# ident "@(#)ftpusers   1.5     04/02/20 SMI"
#
# List of users denied access to the FTP server, see ftpusers(4).
#
#root                                                                  //将root注释掉
daemon
bin
sys
adm
lp
uucp
nuucp
smmsp
listen
gdm
webservd
nobody
noaccess
nobody4
~
~
~
~
"/etc/ftpd/ftpusers" 19 lines, 199 character

登录到windows运行cmd
C:\Users\Administrator>ftp 192.168.6.186         //连接到192.168.6.186
连接到 192.168.6.186。
220 solaris186 FTP server ready.
用户(192.168.6.186:(none)): root                       //输入用户名root
331 Password required for root.
密码:                                                                   //输入密码,此处无回显
230 User root logged in.
ftp> bin                                                               //使用二进制
200 Type set to I.
ftp> put D:\CUUG软件专区\solaris_software\apache-2.2.11-sol10-x86-local.gz     

//将d盘下的apache-2.2.11-sol10-x86-local.gz文件上传到solaris上
200 PORT command successful.
150 Opening BINARY mode data connection for apache-2.2.11-sol10-x86-local.gz.
226 Transfer complete.
ftp: 发送 7873798 字节,用时 0.19秒 41881.90千字节/秒。
ftp> put D:\CUUG软件专区\solaris_software\apache-2.2.21-sol10-x86-local.gz      

//将d盘下的apache-2.2.21-sol10-x86-local.gz文件上传到solaris上
200 PORT command successful.
150 Opening BINARY mode data connection for apache-2.2.21-sol10-x86-local.gz.
226 Transfer complete.
ftp: 发送 7097378 字节,用时 0.23秒 31404.33千字节/秒。
ftp> bye                                                                    //退出
221 Goodbye.

[root@solaris186:/]# ls                                            

//查看根目录下文件,apache-2.2.11-sol10-x86-local.gz和apache-2.2.21-sol10-x86-local.gz文件上传成功
Desktop                           lost+found
Documents                         mnt
apache-2.2.11-sol10-x86-local.gz  net
apache-2.2.21-sol10-x86-local.gz  opt
bin                               platform
boot                              practisenew
dev                               proc
devices                           sbin
etc                               system
export                            tmp
file1                             usr
home                              var
kernel                            vol
lib

 

注意:ftp分为主动连接和被动连接,当处于被动连接时需要关闭系统的防火墙。

你可能感兴趣的:(windows,ftp,Solaris,防火墙)