0

I want an EC2 host with 2 NICs, one for administration and one for hosting a few server processes.

I successfully cloud form'd a host with 2 NICs, each with their own elastic IP. I expect I can SSH into the box from either IP, but I can only connect via the IP assigned to eth0. Connecting via eth1 just hangs.

  • Tried setting up a second SSHD to bind on eth1, didn't work.
  • Turned off SELinux, also didn't work.

What do I need to do to connect to SSH on eth1?

#Just Hangs
chronos@localhost / $ ssh -v ec2-user@35.166.185.195
OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 1: Applying options for *
debug1: Connecting to 35.166.185.195 [35.166.185.195] port 22.

My cloudformation file (uses the rhel7 ami in US-West-2, Oregon): https://s3-us-west-2.amazonaws.com/cf-templates-11rdba5328vvk-us-west-2/2016359ImH-cf2.txt

Also, tried attaching using NetworkInterfaceAttachment instead of the Instance's NetworkInterfaces property, same problem: https://s3-us-west-2.amazonaws.com/cf-templates-11rdba5328vvk-us-west-2/2016359ttS-cf2.txt

1

I would first of all verify that eth1 was capable of connecting outside. I'd probably do this with ssh -b 35.166.185.195 <known good host>. I'd check that sshd was listening in the expected address and ports using ss -tnlp. Then I'd check that the firewall was not blocking packets. If all of those are good then the problem lies outside the box. Perhaps you need to do something with security groups ?

3
  • Good call! I can't connect out to a known good host. Just hangs, like when I try to ssh in! I think it may be an asymmetric routing issue, but I'm not sure how to fix it. Since all the is TCP, I'd be surprised a stateful connection to my server on one interface on one IP would try route out a different NIC through a different IP? – Ziplin Dec 24 '16 at 18:49
  • 1
    and good calls aren't worth an upvote these days :( – user9517 Dec 25 '16 at 10:23
  • Haha, sorry, good call :p – Ziplin Dec 25 '16 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.