Remote Desktop in Centos

I am trying to connect from Centos server to another Centos Server using RDP, VNC,SSH but it does not seem to work as expected.
I can ping from /to both servers


Any help ?

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.

Gerwin Jansen, EE MVETopic Advisor Commented:
Try disabling the firewall on the destination CentOS server (for testing). Can you connect now? If so you need to change firewall settings on the destination CentOS server.
One the destination CentOS machine type the following command to flush iptables:

iptables -F

Then try it again.
jskfanAuthor Commented:
I have run this command but did not help.
iptables -F

I posted the Firewall Gui page, it does not look like ssh is blocked.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Ahh your using firewalld, which iptables will have no effect on.  

Firewalld is a little more complicated.  Just to test, let's stop firewalld.

Run the following command on the destination machine and test again:

systemctl stop firewalld

After the test, reactivate the firewall.

systemctl start firewalld
Gerwin Jansen, EE MVETopic Advisor Commented:
@savone - As I was suggesting already, disable firewall for testing first ;)
@Gerwin Jansen, I agree, I just thought it would be helpful to explain how to do it and why iptables wasn't working.
jskfanAuthor Commented:
[root@localhost liveuser]#  systemctl stop firewalld
[root@localhost liveuser]# ssh root@
ssh: connect to host port 22: Connection refused
[root@localhost liveuser]#

AS you can see , I stopped Firewall but still cannot remote using ssh
You need to stop it on the machine you are trying to connect to (
jskfanAuthor Commented:
To explain what I have done:
I ran the below command in server1
[root@localhost liveuser]#  systemctl stop firewalld

I went to server2 and ran:
ssh root@

I got the following message:
ssh: connect to host port 22: Connection refused
Is sshd started on server1?

Post the output of the following command on server:

systemctl status sshd.service
jskfanAuthor Commented:
I wonder if it is not installed

[root@localhost /]# systemctl status sshd.service
sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled)
   Active: inactive (dead)

[root@localhost /]#
No that means it is not started.

Start the sshd service, keep the firewall off and try again.  Here is the command to start the service.

systemctl start sshd.service

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
jskfanAuthor Commented:
systemctl start sshd.service
Thanks it worked for SSH...

I will post a separate question for RDP and VNC connection
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

From novice to tech pro — start learning today.