首页 > Web开发 > 详细

ubuntu SSH 连接、远程上传下载文件

时间:2016-06-30 19:48:15      阅读:293      评论:0      收藏:0      [点我收藏+]

安装 SSH(Secure Shell) 服务以提供远程管理服务

sudo apt-get install ssh

SSH 远程登入 Ubuntu 机

ssh username@192.168.0.1

将 文件/文件夹 从远程 Ubuntu 机拷至本地(scp)

scp -r username@192.168.0.1:/home/username/remotefile.txt .

将 文件/文件夹 从本地拷至远程 Ubuntu 机(scp)

scp -r localfile.txt username@192.168.0.1:/home/username/

将 文件/文件夹 从远程 Ubuntu 机拷至本地(rsync)

rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .

将 文件/文件夹 从本地拷至远程 Ubuntu 机(rsync)

rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/

ubuntu SSH 连接、远程上传下载文件

原文:http://www.cnblogs.com/luyanliang/p/5630782.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!