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.

Can't scp a file from the sandbox to the local machine

Can't scp a file from the sandbox to the local machine

New Contributor
scpfilefromsandboxtovm.pngguestport.png

I have successfully scp a file from the local machine to the sandbox. Now i would like to do the reverse but facing the problem "no such file directory". I have written this second command in the VM terminal

The port I used is 22 (The guest port for the service "Host SSH") as you can see on the picture "guestport.png"

Does the path to my local machine well written?

Thanks

3 REPLIES 3

Re: Can't scp a file from the sandbox to the local machine

Hi @Oriane,

If you succeeded in one way, you can slightly modify the command to do it the other way around.

Let's say your command to SCP a file to your sandbox was:

scp -p 22 myfile root@sandbox:/tmp

Then you can retrieve the file from the same place with:

scp -p 22 root@sandbox:/tmp/myfile .

As an additional remark, if you are running under Windows, you can use some GUI tools like WinSCP to ease the process.

Hope this helps.

Re: Can't scp a file from the sandbox to the local machine

New Contributor

Thanks Pierre for your response.

I am facing a problem today with the port 22. Unable to transfer from local machine to VM and reverse.

Yesterday , i trasnfer to the sandbox using the port 2122 and it works , but today facing "the port 22 connection refused".

Excuse me , i am a newbie.

scpfilefromsandboxtovm1.png


guestport.png

Re: Can't scp a file from the sandbox to the local machine

If I recall correctly the sandbox is using port 2222 as default port for SSH (and consequently scp).

Don't have an account?
Coming from Hortonworks? Activate your account here