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 connect to Sandbox via WinSCP

Solved Go to solution

Can't connect to Sandbox via WinSCP

New Contributor

Hi,

New user here looking for some help trying to connect WinSCP to the sandbox.

My sandbox (2.4) on VirtualBox (running on Win10) seems to have installed fine (I can enter commands in the VM and bring up the Ambari page).

So far I haven't been able to transfer a file between my local machine and the sandbox though. I'm trying to do it via WinSCP (I've added 127.0.0.1 sandbox.hortonworks.com to my local machine's C:\Windows\... drivers\etc\hosts file).

In WinSCP I choose 'SCP' as file protocol, enter 'sandbox.hortonworks.com' as the host name, port number '22', user name 'root' and then the password - the error I get is "Network error: Connection to 'sandbox.hortonworks.com' refused".

From the local machine command prompt I can successfully ping sandbox.hortonworks.com but ftp'ing from there also gives a connection refused error.

From other threads on here I thought I may have a firewall issue but I don't think it's that... I checked that port 22 appears to be listening on the VM too (via sudo netstat -anp | grep sshd).

Any suggestions as to why I get the connection refused error?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Can't connect to Sandbox via WinSCP

@Neil Morin

Can you check the Virtualbox network rules to see if port forwarding is properly setup? If you ssh/scp to 127.0.0.1 on port 22, that defaults to your local computer. If port forwarding is not setup to forward that port to the VM, then you will get a connection refused.

Network -> Advanced dropdown -> Port Forwarding

11054-screen-shot-2017-01-03-at-10405-pm.png

5 REPLIES 5

Re: Can't connect to Sandbox via WinSCP

@Neil Morin

Can you check the Virtualbox network rules to see if port forwarding is properly setup? If you ssh/scp to 127.0.0.1 on port 22, that defaults to your local computer. If port forwarding is not setup to forward that port to the VM, then you will get a connection refused.

Network -> Advanced dropdown -> Port Forwarding

11054-screen-shot-2017-01-03-at-10405-pm.png

Re: Can't connect to Sandbox via WinSCP

New Contributor

@Michael Young

Hi Michael, thanks for your quick response; the port forwarding for ssh is set as host 2222 / guest 22.

Long time since I've done any work with port numbers but I'm guessing that's not correct?

Re: Can't connect to Sandbox via WinSCP

@Neil Morin

No, that is correct. So you need to connect with WinSCP using port 2222. Virtualbox will forward that port to 22 on the VM.

Re: Can't connect to Sandbox via WinSCP

New Contributor

@Michael Young

Ah, perfect! Works now, many thanks!

Re: Can't connect to Sandbox via WinSCP

@Neil Morin

Excellent, good to hear. Please accept my answer to help others.

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