码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2016-06-30 19:50:56      阅读:134      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!