Solved

Remote Desktop in Centos

Posted on 2014-11-02
13
376 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, 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 37

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fetching data from Multiple Linux Server using Shell Scripting 55 137
Help With Shell Script Centos 6 6 53
AWS Central Authentication 1 65
cannot rename datastore 3 48
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

809 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