Chinaunix首页 | 论坛 | 博客
  • 博客访问: 361696
  • 博文数量: 150
  • 博客积分: 3423
  • 博客等级: 中校
  • 技术积分: 1005
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-15 09:04
文章分类

全部博文(150)

文章存档

2012年(2)

2011年(148)

分类: LINUX

2011-07-27 21:00:25

ssh基本格式:

ssh -l username   -p port   hostname or IP

如: ssh -l kevin_u -p 22 192.168.1.1


scp文件上传格式:

scp -P port localfilepath or ip: remotefilepath

如:scp -P 22 aa.txt

scp文件下载格式:

scp -P 22 or ip:remotefilepath or ip:remotefilepath localfilepath

如:scp -P 22 ./


Eg:

copy 本地的文件到远程的机器上 

scp -P 8022 /etc/lilo.conf my@


会将本地的 /etc/lilo.conf 这个文件 copy 到 ,使用者my 的根目录下。 


===================================================== 

copy远程机器上的文件到本地来 

scp -P 8022 my@:/etc/lilo.conf /etc 


会将 http:// 中 /etc/lilo.conf 文件 copy 到本地的 /etc 目录下。


阅读(649) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~