Skip to content

Instantly share code, notes, and snippets.

@lanrion
Created April 9, 2014 08:34
Show Gist options
  • Save lanrion/10241916 to your computer and use it in GitHub Desktop.
Save lanrion/10241916 to your computer and use it in GitHub Desktop.
linux scp命令使用

scp是有Security的文件copy,基于ssh登录。操作起来比较方便,比如要把当前一个文件copy到远程另外一台主机上,可以如下命令。

scp  / home / daisy / full . tar . gz root@ 172.19 . 2.75 : / home / root

然后会提示你输入另外那台172.19.2.75主机的root用户的登录密码,接着就开始copy了。

如果想反过来操作,把文件从远程主机copy到当前系统,也很简单。

 scp root@ 172.19 . 2.75 : / home / root  / home / daisy / full . tar . gz 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment