最近,为了防止新的互联网服务器因thinkphp5.0.0~5.0. 23版的远程代码执行漏洞而导致网站瘫痪,在检查病毒的过程中影响业务,临时启动了新的服务器那么,如何在这两台服务器之间快速传输文件呢?
在这里,您可以使用scp命令在两台内部网服务器之间快速传输文件。 scp语法如下:
scpr远程用户名@IP地址:文件名本地目录
例如,从内部网IP为10.10.1.1的服务器的www/wwwroot/www.02405.com目录到当前服务器的www/web/www.02405.com文件夹中
scp-r root @ 10.10.1.1:/www/wwwroot/www.02405.com/www.tar.gz www/web/www.02405.com
将显示以下提示:
CP : cannot stat ` root ' : nosuchfileordirectory
theauthenticityofhost ' 10.10.10.1 (* * *.*.* *.* * ) ' can't be established。
rsakeyfingerprintis3b 33609933609 c :9 f 4:0 f :0 fc 3360173360 ea :9633608 a 3360473: f 03:0 f 3:0 f 3:0 f :9 f
areyousureyouwanttocontinueconnecting (是/否)?
如果输入yes,系统将提示您输入远程服务器(10.10.1.1 )的密码。 正确输入后,可以知道传输的进展情况。
实测非常快,内部网8G的文件,几分钟就结束了。