免费申请300美金的Google cloud Platform 云服务器

Google cloud Platform 注册后会送300美金并且可以免费用这笔钱使用12个月的Google平台所有功能,具体注册步骤如下:

登陆注册

首先,点击此处打开链接

同意继续,然后点击免费试用Google 云平台,点击注册

地区选择中国,接受条款,选择同意继续

填写相关信息

填写信用卡信息,注意,信用卡必须是外币卡,比如visa

如果一切没有问题,你会看到提示

申请服务器

可以去申请服务器啦,前提先看看google的计费标准哦
https://cloud.google.com/compute/pricing
选择最低配哦,因为只有300美金,最低配一年60美元,剩下的可以跑带宽。

选择计算引擎,填写项目名称

创建实例


填写相关信息,然后选择实例模版

这里选择最低配

启动磁盘选择操作系统


网络接口外部ip创建一个永久的

然后提交,等待创建后 选择vm实例查看公网 IP

ssh连接

google 推荐使用gcloud来连接

下载安装

curl https://sdk.cloud.google.com | bash

然后一路enter就可以

后台点击vm实例,选择ssh在下拉菜单查看 gcloud命令。

复制他保存到本地,我是保存了个文件,赋予可执行权限, 然后每次执行这个脚本 我就登陆到了服务器

    ➜  .ssh ll login_gcloud
-rwxr-xr-x  1 wenjun  staff    90B  6 19 17:58 login_gcloud
➜  .ssh ./login_gcloud

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.8.0-54-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

7 packages can be updated.
2 updates are security updates.


Last login: Mon Jun 19 09:59:07 2017 from 60.186.221.181
wenjun@instance-1:~$
wenjun@instance-1:~$

防火墙配置

安装ss,然后要去网络找到防火墙 添加入站端口

测试

youtube 4k 无压力

怎么 ssh

1.打开元数据,添加你的公钥,比如我的公钥是

后面的邮件地址不需要复制,直接复制签名的,然后空格跟上用户名,这个用户名就是登录名

➜  ~ ssh [email protected]
The authenticity of host '35.194.225.132 (35.194.225.131)' can't be established.
ECDSA key fingerprint is SHA256:ec29Uapz/R0RQGbIRwq2HHbfNDQjejyjJ2p6oYBWlmk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '35.194.225.132' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-32-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.



The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

wenjun@instance-2:~$