Solved

Remote Desktop in Centos

Posted on 2014-11-02
13
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40418561
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
ID: 40418589
One the destination CentOS machine type the following command to flush iptables:

iptables -F

Then try it again.
0
 

Author Comment

by:jskfan
ID: 40419392
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 23

Assisted Solution

by:savone
savone earned 334 total points
ID: 40419907
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 38

Assisted Solution

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

Expert Comment

by:savone
ID: 40420315
@Gerwin Jansen, I agree, I just thought it would be helpful to explain how to do it and why iptables wasn't working.
0
 

Author Comment

by:jskfan
ID: 40420886
[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
ID: 40420892
You need to stop it on the machine you are trying to connect to (192.168.80.139).
0
 

Author Comment

by:jskfan
ID: 40420895
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
ID: 40420913
Is sshd started on server1?

Post the output of the following command on server:

systemctl status sshd.service
0
 

Author Comment

by:jskfan
ID: 40423034
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
ID: 40423104
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
ID: 40423162
systemctl start sshd.service
Thanks it worked for SSH...

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

705 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