Created 09-10-2016 12:50 PM
I am on step 1.4 in Section 2 of the "Learning the Ropes ..." tutorial (Sandbox in Microsoft Azure). I am able to ssh into my Sandbox using the password I set up for it via Azure during initial setup. I am able to create files in my Sandbox and navigate around. But I cannot scp into the Sandbox! I am pretty sure I'm supposed to run scp from a separate terminal, although it's not 100% clear in the instructions.
Assume my scp command is: scp -P 22 /Path/Somefile.txt MyName@localhost:/MyName
When I run it from within the ssh session, I get:
Console Response: /Path/Somefile.txt: No such file or directory
This makes sense I guess because I'm supposed to be running scp from my local machine
But when I run that same command from a separate terminal window, my Sandbox password is not accepted. I tried using "localhost" literally as well as replacing it with the IP address of my Sandbox host.
I'm stumped. How can it be that the password which works for ssh does not work for scp?
Created 09-11-2016 01:49 PM
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:
Created 09-10-2016 02:06 PM
Can you send the exact output of the failed command?
Created 09-10-2016 04:07 PM
It basically just says "Permission denied".
MyMac:~ LocalUser$ scp -P 22 /Path/Somefile.txt RemoteUser@xx.xx.xx.xx:/RemoteUser
RemoteUser@xx.xx.xx.xx:'s password:
scp: /RemoteUser: Permission denied
When I try port 2222 (as per the tutorial), I just time-out with:
ssh: connect to host xx.xx.xx.xx port 2222: Operation timed out
lost connection
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 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-10-2016 06:10 PM
Hi Suzanne, if the Sandbox is in Azure, I am confused about the use of localhost in the command. To access a Sandbox on Azure, I would think you'd need to find the SSH port in Settings > Endpoints (it's set dynamically) and use the publicly-resolvable hostname (as in this guide). Am I missing something about the setup? How are you successfully ssh'ing?
Created 09-11-2016 02:09 AM
The ‘Learning the Ropes’ tutorial (step 1.4 in Section 2) actually says to use localhost but I eventually realized that didn't make sense so I started using the Public IP address from my Azure Sandbox settings; that's what I mean by xx.xx.xx.xx in my subsequent posts. Sorry if that wasn't clear. I also tried my fully-qualified pubic hostname, logging in as root, and got the same result as when I used the IP address. The tutorial instructions say to use port 2222, but the SSH port is configured as 22 in my Azure Sandbox.
In other words, the following 2 commands do not work. According to the console output, the file is transferred but I cannot find it anywhere on my Sandbox.
scp -P 22 /Path/Somefile.txt root@40.76.83.227:/RemoteDirectory
scp -P 22 /Path/Somefile.txt root@sdimant.cloudapp.azure.com:/RemoteDirectory
Created 09-11-2016 01:49 PM
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:
Created 04-01-2017 06:05 AM
@suzanne Dimant - can you give me the actual scp command you used to get that working . Also what terminal did you use cygwin ?