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

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

MacOS通过终端向Linux服务器上传下载文件 1、从服务器下载文件/文件夹
	* 把文件从服务器下载到本地
		scp  [email protected]:/home/jdk8/jdk-8u311-linux-aarch64.rpm   /Users/xiaodian/Downloads/
	
	* 把远程文件夹从服务器下载到本地
		scp -r [email protected]:/home/jdk8  /Users/xiaodian/Downloads/ 
2、上传本地文件/文件夹到服务器
	* 把文件上传到服务器
		scp /Users/xiaodian/Downloads/jdk-8u311-linux-aarch64.rpm [email protected]:/home/jdk8/
	
	* 把文件夹上传到服务器
		scp -r /Users/xiaodian/Downloads   [email protected]:/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 更新即可

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5707892.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存