Reputation: 13
I keep getting the error as described when using the following command in an SSH window (opened after hitting the "SSH" button on my instance "test-gpu"):
jiatongjiangsherry97@test-gpu:~$ gcloud compute scp
/C:/Users/LENOVO/Downloads/cudnn-9.0-linux-x64-v7.3.1.20.tgz
jiatongjiangsherry97@test-gpu:~/
After I answered "Y" to the following question:
Did you mean zone [us-west1-b] for instance: [test-gpu] (Y/n)? Y
It shows:
/C:/Users/LENOVO/Downloads/cudnn-9.0-linux-x64-v7.3.1.20.tgz: No such file
or directory
ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [1].
But I checked several times that this is the exact directory and file name.
On a side note: I also tried typing all these in a cloud shell window instead of the SSH. And then it returned "Insufficient permission", although I have logged in to my service account. (If this piece of info helps.)
Anyone has any idea why it says "No such file or directory"?
Thanks in advance.
Jiatong
Upvotes: 1
Views: 6910
Reputation: 1516
You may consider transferring files using WinSCP. All needed detail is found in the "Transferring files using WinSCP on Windows workstations" sub-chapter of the "Transferring Files to Instances" online document.
Upvotes: 2
Reputation: 39824
Since you're trying to copy C:/Users/LENOVO/Downloads/cudnn-9.0-linux-x64-v7.3.1.20.tgz
which is a file on your local machine then you need to run the gcloud compute scp
on your local machine.
Running the command in the window open by the SSH
instance button runs it on your compute instance and running it in the cloud shell runs it on the cloud shell instance. Neither of those instances has access to your local machine - hence the No such file or directory
error.
Note that you'll probably need to adjust the command to the local machine OS (apparently Windows) since referencing files is done differently.
Upvotes: 2