加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows与Linux文件互传

发布时间:2020-12-14 06:00:43 所属栏目:Windows 来源:网络整理
导读:Windows与Linux文件互传 1,系统环境 windou10 ubantu16.04TLS 使用技术 openssh scp命令包 2,安装OpenSSH for Windows 2.1,通过命令行安装(管理员权限运行PowerShell) 安装OpenSSH Client Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1

Windows与Linux文件互传

1,系统环境

windou10 ubantu16.04TLS
使用技术 openssh scp命令包

2,安装OpenSSH for Windows

2.1,通过命令行安装(管理员权限运行PowerShell)

安装OpenSSH Client

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

安装OpenSSH Server

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

执行命令后有如下反馈:

Path :
Online : True
RestartNeeded : False

2.2启动windows openssh服务

Start-Service sshd

设置openssh服务自动启动:

Set-Service -Name sshd -StartupType 'Automatic'

确认入站规则已经设定.

Get-NetFirewallRule -Name *ssh*

2.2,Linux环境设定

一般默认安装openssh服务,启动相关服务即可

原文地址

3,命令使用

3.1,Form windows to linux

在cmd命令行中 如下命令

scp /C:/Users/22265/Desktop/del.txt [email?protected]:~/BBBCppWork

注意:在bash中去掉 C盘后的冒号,root_name 换成自己远程主机名

3.2,form linux to windows,如下命令(bash中使用)

scp demo8.cpp [email?protected]:/C:/Users/22265/Desktop

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读