Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

scp not working between OSX 10.11.3 and Sandbox

Solved Go to solution

scp not working between OSX 10.11.3 and Sandbox

New Contributor

I am trying to copy a data file from my Mac to my Sandbox using scp. I have successfully created a directory named "/data" on the Sandbox vm using the root user account. My scp command looks like this:

scp -P 2222 mydatafile.csv root@127.0.0.1:/data

I type in the root password, and scp appears to transfer the file. When I look in the /data directory on the Sandbox vm, the file isn't there.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: scp not working between OSX 10.11.3 and Sandbox

New Contributor

I cheated to get it working properly. I simply added a static IP Address to my Sandbox VM, using a second Host-only adapter on vboxnet0. Now I can use a real IP Address when specifying the target for scp, and it works fine now. Thank you for all the suggestions!

8 REPLIES 8

Re: scp not working between OSX 10.11.3 and Sandbox

So, I assume "ssh -p2222 root@127.0.0.1" works? Can you check permissions "ls -ld /data" and try to scp to /tmp.

Re: scp not working between OSX 10.11.3 and Sandbox

Super Guru
@Michael Aube

Please try below command on your sandbox

scp <username>@<ip-of-mac>:$path/mydatafile.csv $local_path_on_sandbox

Re: scp not working between OSX 10.11.3 and Sandbox

New Contributor

@Kuldeep Kulkarni - It worked for me. Thanks!

Highlighted

Re: scp not working between OSX 10.11.3 and Sandbox

Contributor
@Mayur Bhokase

This did not work for me. Do you have a user on your Mac with the same name as a user on your Sandbox? Is your VM on Azure or on your machine?

Re: scp not working between OSX 10.11.3 and Sandbox

Yep, this worked for me -- from sandbox to mac, but still can't go the other direction. Thanks!

Re: scp not working between OSX 10.11.3 and Sandbox

Super Collaborator

@Michael Aube

Can you check on sandbox

#ls -l /data

Are you sure you have created /data directory .. usually default root home direcotry is /root so , see if data directory is under /root .. I just did that in my sandbox and it works fine for me

MacBook-Pro-7:~ rguruvanagari$ scp -P 2222 id_dsa root@127.0.0.1:/root/data

root@127.0.0.1's password: id_dsa 100% 672 0.7KB/s 00:00

MacBook-Pro-7:~ rguruvanagari$ scp -P 2222 id_dsa root@127.0.0.1:/data

root@127.0.0.1's password: id_dsa

[root@sandbox /]# ls -l /data

-rw------- 1 root root 672 Apr 7 05:12 /data

[root@sandbox /]# ls -l /root/data

total 4

-rw------- 1 root root 672 Apr 7 05:11 id_dsa

Re: scp not working between OSX 10.11.3 and Sandbox

New Contributor

I cheated to get it working properly. I simply added a static IP Address to my Sandbox VM, using a second Host-only adapter on vboxnet0. Now I can use a real IP Address when specifying the target for scp, and it works fine now. Thank you for all the suggestions!

Re: scp not working between OSX 10.11.3 and Sandbox

New Contributor

I cheated to get it working properly. I simply added a static IP Address to my Sandbox VM, using a second Host-only adapter on vboxnet0. Now I can use a real IP Address when specifying the target for scp, and it works fine now. Thank you for all the suggestions!