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 account@192.168.19.54:E:\dirname\filename /localdir

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


scp -r admin@192.168.19.54:e:/crmx-develop/ /b/crm/

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


scp stages.png admin@192.168.19.54:e:/

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


scp -r apache-tomcat-9.0.22 admin@192.168.19.54:d:/soft

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

posted @ 2019-11-04 15:38  jhai  阅读(286)  评论(0编辑  收藏  举报
……