SSh issue

Andre J
Andre J used Ask the Experts™
on
I recently cleaned my server off, and installed a fresh copy of centos 7 linuxs on it. My issue is i have ssh running, but i am only able to access it with my private ips. I am not clear on how to set it up to use my static ip and domain names? Please help? The domains are not setup yet, since i just installed centos 7 again. i need help with the basic understand of setting my ssh up to allow remote access in another city.  when i try to use my static ip to access it i get this error "port 22: No route to host ". My firewall is complete down, so there or not blocks, so it has to be a configuration issue. i Just dont know what to do to fix it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Network Administrator
Commented:
This is not an SSH issue, it is a routing issue. If you can access it via private IP's, your netcard is set up right.
If you are trying to access it via public IP's you need to go to your router and either nat the connection, or if setting the public IP on the server making sure the router is the gateway. Some routers also require routing statements to get public ips to be visible on the internal interfaces also.
David FavorFractional CTO
Distinguished Expert 2018

Commented:
First test... Ping Google + if that works, issue this command...

curl -I -L google.com

Open in new window


If both work, then likely something in iptables is interferring with port 22 traffic.

Try flushing all rules + retry your ssh command.

iptables -F

Open in new window


Still having problems, try this command to see exactly where your packets drop.

mtr google.com

Open in new window

Rahul ShendeJr. Linux System Administrator

Commented:
check your /etc/resolv.conf

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial