LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2012, 11:29 AM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
Centos 6 cannot ssh externally?


Dear All,
I have just installed centos 6. I would like to ssh to the machine. So I have checked ssh service is running, firewall allows port 22, iptables also allow port 22 and also disabled SELinux. With all these I cannot still ssh from externally. But locally when I just telnet 192.168.1.5 22 I get the ssh message. Why I cannot do it externally even though I have set the port forwarding to the machine? Any steps I am missing?
 
Old 01-03-2012, 11:31 AM   #2
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Start the sshd service.
 
Old 01-03-2012, 11:32 AM   #3
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Snowpine,
I have checked the status service sshd status it shows me running with a particular pid.
 
Old 01-03-2012, 11:33 AM   #4
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
What is the error message?
 
Old 01-03-2012, 11:34 AM   #5
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Snowpine,
When I telnet from local ip is ok, from eternal ip it like trying to connect and just close no error message.
 
Old 01-03-2012, 11:35 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Are you trying to connect from the outside from your LAN, or do you connect from the inside to the outside and back in?
Some routers don't support this.
Any error messages?

Kind regards
 
Old 01-03-2012, 11:36 AM   #7
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
telnet is not ssh

http://www.centos.org/docs/5/html/De...nt-config.html
 
Old 01-03-2012, 11:38 AM   #8
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
Yes I trying to connect back into the LAN using dynamic ip of the LAN. But is still the same connection just trying to go outside and come back in.Where to check the edit message it just close the terminal?
 
Old 01-03-2012, 11:43 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Try from the outside.
You can use an online portscanner to see if por 22 is answerig.
http://nmap-online.com/

Kind regards
 
Old 01-03-2012, 11:51 AM   #10
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
Below is the results. So what does this translates into?

Nmap Options: -p22-23 -T4 -sS 124.82.40.118

Starting Nmap 4.75 ( http://nmap.org ) at 2012-01-03 18:47 Central Europe Standard Time
Note: Host seems down. If it is really up, but blocking our ping probes, try -PN
Nmap done: 1 IP address (0 hosts up) scanned in 2.62 seconds
 
Old 01-03-2012, 11:53 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Note: Host seems down. If it is really up, but blocking our ping probes, try -PN
Does your firewall/router blocks ping requests?
Try to use the
Code:
-PN
option.

Kind regards
 
Old 01-03-2012, 11:56 AM   #12
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
The latest results is below

Nmap Options: -p22-23 -PN -T4 -sS 124.82.40.118

Starting Nmap 4.75 ( http://nmap.org ) at 2012-01-03 18:56 Central Europe Standard Time
Interesting ports on 82.124.in-addr.arpa.tm.net.my (124.82.40.118):
PORT STATE SERVICE
22/tcp filtered ssh
23/tcp filtered telnet
 
Old 01-03-2012, 11:59 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Could it be your provider is blocking ports?
Try to set ssh to another port (2222 or something higher)

Kind regards
 
Old 01-03-2012, 12:03 PM   #14
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
I do not think my provide is blocking this port. So you want me to change the sshd to listen to different port is it?
 
Old 01-03-2012, 12:07 PM   #15
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
So you want me to change the sshd to listen to different port is it?
Yes, try 2222
Don't forget the forwarding on the router, and to adjust the firewall if needed.

Kind regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to access CentOS web server externally rahilmaknojia Linux - Server 4 11-05-2011 05:00 PM
SSH not working externally Ryan_Sutton Linux - Newbie 6 11-18-2008 05:01 PM
SSH and CentOs, need help HyperTrey Linux - Desktop 6 10-18-2006 03:22 PM
CentOS 3.4 SSH Hangup wired420 Linux - General 3 01-27-2005 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration