Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Trying to copy file from my windows machine to sandbox and not succeding

avatar
Rising Star

Hello @slachterman

Greetings!!!

I am trying to copy a file from my local windows machine to sandbox using below command and not seeing the file in sandbox root directory after executing command.

scp -P C:/Users/rnkumashi/Downloads/sample.txt root@localhost:/root

1.I am connected to sandbox using Vm ware.

2.After executing the command i am trying to list the content in sandbox root directory and not seeing the file.

Please see below for the details.

5303-scp-command.png

any help would be great and i am new to sandbox.

1 ACCEPTED SOLUTION

avatar

@Ravikumar Kumashi

Try this command instead.

scp -P 2222 C:/Users/rnkumashi/Downloads/sample.txt root@localhost:/root

However you need something like cygwin to make scp work from windows machine.

You have to run the command from windows, not sandbox.

This is a good document to get you started http://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

View solution in original post

33 REPLIES 33

avatar
Rising Star
@Rahul Pathak

Thanks a lot it worked great

5324-success-file-cygwin.png

5325-success-file-sandbox.png

avatar
Rising Star

@slachterman Thanks for your input and your input are really helpful keep helping newbies..thanks a ton!!!

I used the below commad to copy file from local machine to sandbox using cygwin and it worked.

scp /cygdrive/c/Users/rnkumashi/Downloads/sample.txt root@192.168.228.128:/root

avatar

@Ravikumar Kumashi Great to hear! Glad I could help.

avatar
Explorer

12477-capture-hjsb.png

capture-hjsb.png

Hello @Rahul Pathak,

Could you please help me with this..

I'm stuck here since 2 days and tried everything 😞

avatar
@Rakshith Gowda have you tried specifying port 2222 with scp (scp -P 2222 . . .)? Port 2222 is usually forwarded to 22 when using NAT. Are you able to SSH to this host on port 22 or on port 2222?

avatar
Explorer

@slachterman yes I did try this.. it's showing like this

12480-capture.png

avatar

Please note the capital P. The error message indicates you are still attempting to connect to port 22.

Please also verify SSH connectivity, per the above.

avatar
Explorer

Wow! Found it!! Thanks a lot 🙂

avatar
Explorer

@Ravikumar Kumashi please could you look at this..

avatar
Explorer
@slachterman

Help please!?