Support Questions
Find answers, ask questions, and share your expertise

copy a file from localhost to root@sandbox

New Contributor

Bonjour, je voudrais copier le fichier kafka que j'ai téléchargé de mon répertoire local vers root@sandbox pour pouvoir l'installer. J'ai essayé plusieurs syntaxes avec "scp -p" en vain.

[root@sandbox ~]# scp -P 8080 root@localhost:F:/myRepository/kafka_2.11-0.10.1.1.gz /Kafka

[root@sandbox ~]# scp -P 8080 root@localhost:F:/myRepository/kafka_2.11-0.10.1.1.gz root@sandbox:/Kafka

[root@sandbox ~]# scp -P 8080 F:/myRepository/kafka_2.11-0.10.1.1.gz /Kafka

4 REPLIES 4

Re: copy a file from localhost to root@sandbox

Contributor

Hi

you haven't mentioned the error you were getting.

Port 8080 is for ambari. You can use the port 2222 in sandbox environment for ssh /scp.

Example:

scp -P 2222 /path/to/file/kafka_2.11-0.10.1.1.gz root@sandbox:/tmp/

Re: copy a file from localhost to root@sandbox

New Contributor

You can look for some info in the link bellow. Please take a look at section 1.5

http://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

Re: copy a file from localhost to root@sandbox

New Contributor

Hello,

with

[root@sandbox ~]# scp -P 2222 /D:\kafka\kafka_2.11-0.10.1.1.gz

root@sandbox

:/tmp/

my error was :

ssh: Could not resolve hostname sandbox: Temporary failure in name resolution

and when i tried another test :

[root@sandbox ~]# scp -P 2222 /D:\kafka\kafka_2.11-0.10.1.1.gz /tmp/

my error was :

cp: cannot stat '/D:\\kafka\\kafka_2.11-0.10.1.1.gz' No such file or directory (but this directory and this file exist. But i am using the free version of hortonworks Platform)

Re: copy a file from localhost to root@sandbox

Contributor

Hi

Add the following entry in the file for windows c:/Windows/System32/Drivers/etc/hosts

127.0.0.1 sandbox

and then run the command scp -P 2222 /D:\kafka\kafka_2.11-0.10.1.1.gz root@sandbox:/tmp/

(or)

scp -P 2222 /D:\kafka\kafka_2.11-0.10.1.1.gz root@127.0.0.1:/tmp/