栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

MacOS通过终端向Linux服务器上传下载文件

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

MacOS通过终端向Linux服务器上传下载文件

1、从服务器下载文件/文件夹
	* 把文件从服务器下载到本地
		scp  root@121.40.157.86:/home/jdk8/jdk-8u311-linux-aarch64.rpm   /Users/xiaodian/Downloads/
	
	* 把远程文件夹从服务器下载到本地
		scp -r root@121.40.157.86:/home/jdk8  /Users/xiaodian/Downloads/ 
2、上传本地文件/文件夹到服务器
	* 把文件上传到服务器
		scp /Users/xiaodian/Downloads/jdk-8u311-linux-aarch64.rpm root@121.40.157.86:/home/jdk8/
	
	* 把文件夹上传到服务器
		scp -r /Users/xiaodian/Downloads   root@121.40.157.86:/home/jdk8/

出现如下问题
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:iTcF9yTf38Q/CgCX7ZRj55wLHshuzvOWndk6UFOM+0U.
Please contact your system administrator.
Add correct host key in /Users/xiaodian/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/xiaodian/.ssh/known_hosts:6
Host key for 121.40.157.86 has changed and you have requested strict checking.
Host key verification failed.
lost connection

输入命令ssh-keygen -R 121.40.157.86 更新即可

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/709351.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号