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.

Unable to transfer files from Mac Desktop to Cloudera VM

Solved Go to solution
Highlighted

Unable to transfer files from Mac Desktop to Cloudera VM

Explorer

I am trying to transfer files from my Mac desktop to Cloudera VM, however it does not work. I have used the following commands to do so. Looking forward to experts for help.

I have tried following commands and got corresponding errors:

 

Command: scp -P 2222 -r sample.txt cloudera@127.0.0.1:/home/cloudera/
Error: ssh: connect to host 127.0.0.1 port 2222: Connection refused
lost connection
 
Command: scp -r sample.txt cloudera@127.0.0.1:/home/cloudera/
Error: ssh: connect to host 127.0.0.1 port 22: Connection refused
lost connection

 

Command: scp -r sample.txt cloudera@quickstart.cloudera:/home/cloudera
Error: ssh: Could not resolve hostname quickstart.cloudera: nodename nor servname provided, or not known
lost connection

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Re: Unable to transfer files from Mac Desktop to Cloudera VM

Explorer

Re: Unable to transfer files from Mac Desktop to Cloudera VM

Master Collaborator
SSH in the VM will listen on port 22 by default. You're hitting port 2222
on your host machine. If you're using VirtualBox, you can set up port
forwarding in VirtualBox so that port 2222 on your host machine is
forwarded to 22 (this is probably the easiest solution, but that isn't done
out of the box). The alternative is to configure the VM to use something
other than NAT for the virtual network. If you configure it to bridged
networking or a similar option, it will get it's own IP address that you
can use to connect to port 22 from your host machine.

View solution in original post

2 REPLIES 2
Highlighted

Re: Unable to transfer files from Mac Desktop to Cloudera VM

Explorer

Re: Unable to transfer files from Mac Desktop to Cloudera VM

Master Collaborator
SSH in the VM will listen on port 22 by default. You're hitting port 2222
on your host machine. If you're using VirtualBox, you can set up port
forwarding in VirtualBox so that port 2222 on your host machine is
forwarded to 22 (this is probably the easiest solution, but that isn't done
out of the box). The alternative is to configure the VM to use something
other than NAT for the virtual network. If you configure it to bridged
networking or a similar option, it will get it's own IP address that you
can use to connect to port 22 from your host machine.

View solution in original post

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