SSh issue

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.
Andre JITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott SilvaNetwork AdministratorCommented:
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.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
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

0
Rahul ShendeJr. Linux System AdministratorCommented:
check your /etc/resolv.conf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.