- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Cannot scp a file from local machine to Azure Sandbox
- Labels:
-
Hortonworks Data Platform (HDP)
Created 09-09-2016 01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to ssh into my Sandbox on Azure but can't send a file via scp because I'm challenged for a localhost password which I do not know. Assuming my Azure username is myName, this is the command I'm running:
scp -P 22 ~/Downloads/Somefile.txt MyName@localhost:/MyName
The console returns with:
MyName@locahost's password:
I've tried my Azure password, my Mac's password, the ENTER key, and "hadoop". Nothing works. I tried both port 22 and port 2222. Please advise. I'd like to move on to some real tutorials but I can't even copy a file to my Sandbox! 😞
I get "Permission denied, please try again" and after 3 attempts "Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)" and then "lost connection"
Created 09-11-2016 01:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I finally got it to work! The instruction in Step 1.4 in Section 2 of the "Learning the Ropes ..." tutorial (Sandbox in Microsoft Azure) is wrong, in 3 ways:
- The scp port for Azure is 22, not 2222
- You must scp into Azure as root; therefore you must reset the root password in your Sandbox first using 'sudo passwd root'
- Your home directory is not just “RemoteUser” from root’s perspective, but /home/RemoterUser'
Created 09-09-2016 03:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is your sandbox root account with the password you set initially when you accessed the sandbox.
Created 09-09-2016 12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @Constantin Stanca, that worked!
Created 09-10-2016 01:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, @Constantin Stanca ... I think I accepted your answer prematurely.
I got past the password challenge, but then scp couldn't find my file so I opened a separate question "Aligning Home Directories between Sandbox and local Mac?" which is still unresolved. After some research, I am pretty sure the problem was that I running scp from inside my ssh session (trying to send a file from local to remote) which doesn't really make sense. When I run scp from a separate terminal window, I can't get past the password challenge.
Also, the password I used to get past the password challenge (when I wrote back to you) was the one I used to set up my Sandbox in Azure. But I just realized that's not actually a root password, it's just a user account password. I just confirmed that by trying to "su" from within my ssh session and failing. I also tried ssh'g into my Sandbox as root and failed.
How do I find and/or recover my Sandbox root password?
Created 09-10-2016 04:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: I was able to make a little progress by resetting my root password on my Sandbox (using 'sudo passwd root') and then scp'g in as root with that password. The console response makes it seems as if a file was actually transferred but I cannot find it anywhere on my Sandbox (even using 'find /*.txt'). In that case the console output was:
root@xx.xx.xx.xx:'s password:
Somefile.txt 100% 133KB 133.4KB/s 00:00
When I try port 2222 (as per the tutorial), I just time-out with the response below (I read in other posts that people are recommending port 22 for Azure):
ssh: connect to host xx.xx.xx.xx port 2222: Operation timed out
lost connection
When I try to scp in as root from the web client, I'm back to ground zero:
root@xx.xx.xx.xx:'s password:
/Path/Somefile.txt: No such file or directory
So confused ... 😞
Created 09-11-2016 01:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I finally got it to work! The instruction in Step 1.4 in Section 2 of the "Learning the Ropes ..." tutorial (Sandbox in Microsoft Azure) is wrong, in 3 ways:
- The scp port for Azure is 22, not 2222
- You must scp into Azure as root; therefore you must reset the root password in your Sandbox first using 'sudo passwd root'
- Your home directory is not just “RemoteUser” from root’s perspective, but /home/RemoterUser'
Created 09-11-2016 03:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good for you! I guess that if you look retrospectively, I responded to most of your question as it was stated.
Created 09-12-2016 12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree. It was a HUGE hint. I had a few other things to think through but knowing I had to scp in as root was pivotal. Thank you! BTW the tutorial needs a little correction/elaboration on that step; not sure exactly who that needs to be communicated to?
