欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

怎么使用SSH从服务器下载文件

发布时间:2023/12/10 编程问答 36 豆豆
生活随笔 收集整理的这篇文章主要介绍了 怎么使用SSH从服务器下载文件 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

可以使用scp命令,scp通过扩展cp的语法,使用ssh协议来跨系统copy文件

1.从另外一个系统(比如:服务器)拷贝文件到本系统(本机)

scp username@hostname:/path/to/remote/file /path/to/local/file

2.从本系统(本机)拷贝文件到另外一个系统(服务器)

scp /path/to/local/file username@hostname:/path/to/remote/file

3.从一个系统(服务器A)拷贝文件到另外一个系统(服务器B)

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

scp命令参数介绍
https://www.runoob.com/linux/linux-comm-scp.html

总结

以上是生活随笔为你收集整理的怎么使用SSH从服务器下载文件的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。