Support Questions

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

Unable to transfer files from Mac Desktop to Cloudera VM

avatar
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

avatar
Explorer

avatar
Guru
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

avatar
Explorer
I was able to solve the issue by following the tips via link. Thanks to Morgan.

https://community.cloudera.com/t5/Hadoop-101-Training-Quickstart/unable-to-Ssh-using-putty-from-wind...

The Youtube link: https://www.youtube.com/watch?v=AhSNj7s5Fko was very useful.

avatar
Guru
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.