1.如何将文件内容从远程服务器位置(即ssh ru@9.122.145.169)复制到(/ home / remo / remo / php =>本地位置)。
我尝试了以下方法:
[remo@oc perl]$ ssh ru@9.122.145.169
Password:
Last login: Mon Nov 20 08:33:41 2017 from oc.im.com
Installation image server SLES10 / OpenDeployServer
ru@e7:~> vi index.php
我想复制(index.php)文件中的内容tomy local location(home / remo / remo / perl)
我试过的命令如下,但在我的情况下失败了:
cp index.php /home/remo/remo/php
答案 0 :(得分:1)
您应该使用scp来实现:
https://en.wikipedia.org/wiki/Secure_copy
在你的情况下:
scp ru@9.122.145.169:/<pathtofile>/index.php /home/remo/remo/php
您将被提示以与ssh相同的方式输入密码