-2

I want to copy a file present on my local directory i.e. C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\config.xml

to remote linux machine directory : /apps/configuration/

I tried command using putty but it says No such file or directory :

scp C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\standalone-full.xml /apps/instances/express_13000/configuration/
4

3 回答 3

1

scp需要一个远程主机名来复制到(或从)。在您的示例命令中,您没有指定要复制到哪个主机,因此它假定您正在执行本地复制。

于 2013-08-22T16:20:44.687 回答
0

为了scp了解您想要访问远程机器,您需要指定该机器的地址。

您当前的命令会将 xml 文件复制到另一个名为“/apps/instances/express_13000/configuration/”的本地文件,如果它甚至可以工作的话。

scp C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\standalone-full.xml /apps/instances/express_13000/configuration/

而是尝试这样的事情:

scp C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\standalone-full.xml username@10.0.1.2:/apps/instances/express_13000/configuration/

当然,将“username”替换为该机器的用户名,将“10.0.1.2”替换为实际机器的 IP 地址。

于 2013-08-22T16:24:12.993 回答
0

对不起,误读了这个问题。

将“用户名:密码@主机名:”添加到您的命令文件中。

scp C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\standalone-full.xml 用户名:password@hostname:/apps/instances/express_13000/configuration/

例如:scp C:\Users\karansha\Desktop\Backup\sj1slm612\express_13000\standalone-full.xml karansha:karanshaspassword@karansha.com:/apps/instances/express_13000/configuration/

于 2013-08-22T16:21:14.430 回答