Solved

Remote Desktop in Centos

Posted on 2014-11-02
13
359 Views
Last Modified: 2014-11-04
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


RDP :
rdpVNC:
vncSSH:
ssh

Any help ?

Thanks
0
Comment
Question by:jskfan
  • 6
  • 5
  • 2
13 Comments
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
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.
0
 
LVL 23

Expert Comment

by:savone
Comment Utility
One the destination CentOS machine type the following command to flush iptables:

iptables -F

Then try it again.
0
 

Author Comment

by:jskfan
Comment Utility
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.
firewall
0
 
LVL 23

Assisted Solution

by:savone
savone earned 334 total points
Comment Utility
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
0
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 166 total points
Comment Utility
@savone - As I was suggesting already, disable firewall for testing first ;)
0
 
LVL 23

Expert Comment

by:savone
Comment Utility
@Gerwin Jansen, I agree, I just thought it would be helpful to explain how to do it and why iptables wasn't working.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:jskfan
Comment Utility
[root@localhost liveuser]#  systemctl stop firewalld
[root@localhost liveuser]# ssh root@192.168.80.139
ssh: connect to host 192.168.80.139 port 22: Connection refused
[root@localhost liveuser]#


AS you can see , I stopped Firewall but still cannot remote using ssh
0
 
LVL 23

Expert Comment

by:savone
Comment Utility
You need to stop it on the machine you are trying to connect to (192.168.80.139).
0
 

Author Comment

by:jskfan
Comment Utility
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@192.168.80.139

I got the following message:
ssh: connect to host 192.168.80.139 port 22: Connection refused
0
 
LVL 23

Expert Comment

by:savone
Comment Utility
Is sshd started on server1?

Post the output of the following command on server:

systemctl status sshd.service
0
 

Author Comment

by:jskfan
Comment Utility
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 /]#
0
 
LVL 23

Accepted Solution

by:
savone earned 334 total points
Comment Utility
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
0
 

Author Closing Comment

by:jskfan
Comment Utility
systemctl start sshd.service
Thanks it worked for SSH...

I will post a separate question for RDP and VNC connection
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now