0

I can move files from my laptop to a gcloud VM instance just fine, the other way around however is not so easy. According to this website I am to use this syntax:

scp -i ~/.ssh/my-ssh-key username@ip-address:remote-file-path local-file-path

I have done all that. At first I got the warning:

The authenticity of host 99.99.99.99 can't be established.
ECDSA key fingerprint is zzzzz
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 99.99.99.99 (ECDSA) to the list of known hosts.

Then I got the error message:

kylefoley@99.99.99.99: Permission denied (publickey).

I am putting these commands in the terminal of my local laptop. I then went and changed all of the permissions for each folder, subfolder and file. But that did not help.

logic1976
  • 101

1 Answers1

0

I don't why the above syntax did not work but the following syntax does work in command line

gcloud compute scp --zone us-west2-a [instance-name]:[path-to-file] [local-path]

That incidentally was the syntax I was using to move files from the laptop to the vm instance but I did not think it would work.

logic1976
  • 101