scp command silently does nothing

2

1

I need to copy a file from my local machine to Amazon AWS Ubuntu machine.

First I tried just this:

scp -i learndeepai.pem sb_code.zip ubuntu@34.211.158.***

As soon as I execute this, nothing special happens, no errors, I am returned to the command line again, so obviously no upload has happened. The instance is running when I trying to run this command, so it should be able to connect to it.

I then tried this:

pscp scp -i learndeepai.pem sb_code.zip ubuntu@34.211.158.***

and got response this time:

More than one remote source not supported

How can I upload my zip file to my AWS instance, seems nothing works. I am on Windows 10 and have PuTTY and scp installed.

I'm using http://cmder.net/ as my console

niko craft

Posted 2017-12-05T11:29:31.077

Reputation: 133

on windows 10, I did what you suggested: pscp -i learndeepai.pem sb_code.zip ubuntu@34.211.158.*** and got this: Local to local copy not supported – niko craft – 2017-12-05T11:49:27.870

Answers

4

You are missing a colon (:) after the "target" argument:

scp -i learndeepai.pem sb_code.zip ubuntu@34.211.158.***:

Without the colon, the command is an equivalent to cp, so it copies learndeepai.pem to a local file ubuntu@34.211.158.***.


Thanks to pscp, which does not support the (useless) local copy function, you easily learn that, as it says:

C:\>pscp -i learndeepai.pem sb_code.zip ubuntu@34.211.158.***
Local to local copy not supported

Martin Prikryl

Posted 2017-12-05T11:29:31.077

Reputation: 13 764