前言
学习过程中天天虚拟机,今天换个新颖的,使用阿里云的云服务器ECS做做线上。
这是我准备的环境,3台nginx服务器
设备 | 作用用途 |
---|---|
nginx服务器(172.16.46.98) | 做负载均衡服务器 |
nginx服务器(172.16.46.99) | web1 |
ngin服务器(172.16.46.100) | web2 |
使用xshell登录公网ip,然后再通过ssh,连接其他两台内部主机
[E:\~]$ ssh root@39.104.79.172
Connecting to 39.104.79.172:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
WARNING! The remote SSH server rejected X11 forwarding request.
Welcome to Alibaba Cloud Elastic Compute Service !
[root@iZhp33kjmxtw7j000sxgfoZ ~]#
[root@iZhp33kjmxtw7j000sxgfoZ ~]#
[root@iZhp33kjmxtw7j000sxgfoZ ~]#
[root@iZhp33kjmxtw7j000sxgfoZ ~]# hostname lb
[root@iZhp33kjmxtw7j000sxgfoZ ~]# bash
[root@lb ~]#
类似于跳板机,再打开2个一模一样的终端,ssh连接另两台
[root@iZhp33kjmxtw7j000sxgfoZ ~]# ssh root@172.16.46.99
The authenticity of host '172.16.46.99 (172.16.46.99)' can't be established.
ECDSA key