将 ftp 文件发送到 Google Cloud debian 9

Send ftp file to Google Cloud debian 9

我正在尝试使用以下方法将文件发送到 google 云:

ftp -inv $HOSTFTP << EOF
user $USERFTP $PASSFTP
binary
get file.zip
bye
EOF

我配置:

 Host xx.xxx.xxx
   StrictHostKeyChecking no

但是当我尝试在 Google 云中使用 ftp 时,总是连接断开! 另一个服务器正在工作.. 怎么了? 我正在考虑来自 google 云虚拟机的一些块。

在 GCP 中有一个内置概念 Firewall Rules

默认情况下,任何新 VM 都会打开有限数量的端口(如 80 和 443)- 确保计算机具有防火墙规则允许的端口 21 和 22。