从 GCP 虚拟机内部到另一台服务器的 scp
scp from inside a GCP VM to another server
我正在尝试将文件 samtools.tar.bz2
从 VM 实例内部传输到另一台名为 username@server.uni.no:
的 GCP 外部服务器,但是,我收到以下错误:
gcloud beta compute scp --project "absolute-bison-xxxx" --zone "europe-west4-a" samtools.tar.bz2 username@server.uni.no:/home/local/user
错误
ERROR: (gcloud.beta.compute.scp) Could not fetch resource: - Invalid value 'server.uni.no'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}'
看看 documentation:
(BETA) gcloud beta compute scp securely copies files between a virtual machine instance and your local machine using the scp command.
(...)
When the destination of your transfer is local, all source files must be from the same virtual machine.
When the destination of your transfer is remote instead, all sources must be local.
它不适用于两台远程计算机,即使它们都在 GCP 中也是如此。
一个粗略的解决方法是将文件下载到您的本地计算机:
gcloud beta compute scp --project "absolute-bison-xxxx" --zone "europe-west4-a" USERNAME@INSTANCE_NAME:~/samtools.tar.bz2 samtools.tar.bz2
然后上传到外部服务器:
scp samtools.tar.bz username@server.uni.no:/home/local/user
我正在尝试将文件 samtools.tar.bz2
从 VM 实例内部传输到另一台名为 username@server.uni.no:
的 GCP 外部服务器,但是,我收到以下错误:
gcloud beta compute scp --project "absolute-bison-xxxx" --zone "europe-west4-a" samtools.tar.bz2 username@server.uni.no:/home/local/user
错误
ERROR: (gcloud.beta.compute.scp) Could not fetch resource: - Invalid value 'server.uni.no'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}'
看看 documentation:
(BETA) gcloud beta compute scp securely copies files between a virtual machine instance and your local machine using the scp command.
(...)
When the destination of your transfer is local, all source files must be from the same virtual machine. When the destination of your transfer is remote instead, all sources must be local.
它不适用于两台远程计算机,即使它们都在 GCP 中也是如此。
一个粗略的解决方法是将文件下载到您的本地计算机:
gcloud beta compute scp --project "absolute-bison-xxxx" --zone "europe-west4-a" USERNAME@INSTANCE_NAME:~/samtools.tar.bz2 samtools.tar.bz2
然后上传到外部服务器:
scp samtools.tar.bz username@server.uni.no:/home/local/user