当前位置: 首页 > Linux

window传输文件到阿里云ESC(Centos)

时间:2023-04-06 23:12:22 Linux

配置老版本(cenOS7以下)。首先我们需要查看当前ssh服务是否开启。如果没有开启,我们需要使用servicesshrestart来开启。检查当前ESC是否开启ssh服务netstat-tl或servicesshstatus如果当前ssh没有安装,通过yuminstallopenssh-clients安装。新版本(Centos7及以上)1.查看sshd服务是否启动#systemctlstatussshd.service2.如果没有启动,需要启动服务:#systemctlstartsshd.service3.重启sshd服务:#systemctlrestartsshd.service4.设置服务Enableself-starting:#systemctlenablesshd.service开始传输文件(1)像Linux一样使用PuTTywindow传输文件,我们先去doc,首先我们需要进入PuTTy下的目录进行操作。pscp文件路径+文件名root@+公网地址:/home/存放位置例如:pscpE:\tmp\apache-tomcat-8.5.14.tar.gzroot@xxx.xx.xxx.xxx:/home/tmp下载文件从linux传输文件到windows,在windows的cmd中输入pscproot@hpstIp:linux中源文件的路径例如:pscproot@xxx.xx.xxx.xxx:/home/love.pngE:/pic/(2)使用Xshell命令行输入:rz,结果提示rz:commandnotfound,找不到rz命令。安装lrzsz#yum-yinstalllrzsz安装完成后,在当前需要放文件的地方输入rz#rzdownload下载一个文件#szfilename下载多个文件#szfilename1filename2下载dir目录下的所有文件,不包含dir#szdir/*下的文件夹