Support Questions

Find answers, ask questions, and share your expertise

scp not working between OSX 10.11.3 and Sandbox

avatar
Explorer

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

avatar
Explorer

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!

View solution in original post

8 REPLIES 8

avatar
Master Guru

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

avatar
Master Guru
@Michael Aube

Please try below command on your sandbox

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

avatar

@Kuldeep Kulkarni - It worked for me. Thanks!

avatar
Rising Star
@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?

avatar

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

avatar
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

avatar
Explorer

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!

avatar
Explorer

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!