大网数据广告活动
服务器运维问答

SSH connection between two server after VPC Peering

· 52CE 我爱测

I am trying to configure SSH connection between two server on two different VPC on my same account. VPC1: vpc-ba8ce8d2 172.31.0.0/16 rtb-576e373f acl-0dbefa65 VPC2: vpc-0c5fc020e4f30283d 10.0.0.0/24 rtb-02f581a0a300cb527 acl-03ae…

问题原文

原帖链接 · Geo · CC BY-SA 4.0

I am trying to configure SSH connection between two server on two different VPC on my same account.

VPC1:

vpc-ba8ce8d2
172.31.0.0/16
rtb-576e373f
acl-0dbefa65

VPC2:

vpc-0c5fc020e4f30283d
10.0.0.0/24
rtb-02f581a0a300cb527
acl-03ae3b5c655207

I configured VPN peering and accepted and also modified Route table as follows:

In Server and VPC acl and security group in Inbound its allowed all traffic from 0.0.0.0/0 Also in Subnet Association added all subnets. (On VPC1 3 subnets and on VPC2 1 subnet).

But Still I cant able to connect SSH.

root@ip-172-31-6-77:~# ip addr | grep eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP group default qlen 1000
    inet 172.31.6.77/20 brd 172.31.15.255 scope global eth0
root@ip-172-31-6-77:~# telnet 10.0.0.243 22
Trying 10.0.0.243...



root@ip-10-0-0-243:~# ip addr | grep eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP group default qlen 1000
    inet 10.0.0.243/24 brd 10.0.0.255 scope global eth0
root@ip-10-0-0-243:~# telnet 172.31.6.77 22
Trying 172.31.6.77...

Can anyone please help us. What is missing from my side?

已采纳解答

原帖链接 · Deepak Deore · CC BY-SA 4.0

rtb-02f581a0a300cb527 has 172.16.0.0/16 but the actual CIDR is 172.31.0.0/16 (second octet is 31 not 16)

fix the destination CIDR to 172.31.0.0/16 in rtb-02f581a0a300cb527, that should resolve the issue.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-05-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。