Liunx 与windows 互传文件

  本文使用putty client 连接window10 的openssh,openssh为win10自带,使用net start sshd开启win10上的ssh服务,win10openssh为可选的,安装方法,linux 主机上使用putty ssh连接到win10
  scp指令用法:



root@root:~# scp
usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program] source ... target


将win10上的文件拷贝到本地(局域网)使用一下指令,在Linux上的terminal终端执行
  拷贝单个文件到本地


scp [email protected]:E:\dirname\filename /localdir


  拷贝多个文件,将整个目录拷贝下来


scp -r [email protected]:e:/crmx-develop/ /b/crm/


  上传单个文件到服务器.stages.png 为当前Linux目录下的文件


scp stages.png [email protected]:e:/


  上传多个文件到win10服务器,使用-r选项将apache-tomcat-9.0.22目录上传到win10上


scp -r apache-tomcat-9.0.22 [email protected]:d:/soft


  Attention:上传和下载都需要输入密码认证

猜你喜欢

转载自www.cnblogs.com/xhai/p/11792309.html