LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Centos 6 cannot ssh externally? (https://www.linuxquestions.org/questions/linux-networking-3/centos-6-cannot-ssh-externally-921817/)

newbie14 01-03-2012 11:29 AM

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?

snowday 01-03-2012 11:31 AM

Start the sshd service.

newbie14 01-03-2012 11:32 AM

Dear Snowpine,
I have checked the status service sshd status it shows me running with a particular pid.

snowday 01-03-2012 11:33 AM

What is the error message?

newbie14 01-03-2012 11:34 AM

Dear Snowpine,
When I telnet from local ip is ok, from eternal ip it like trying to connect and just close no error message.

repo 01-03-2012 11:35 AM

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

snowday 01-03-2012 11:36 AM

telnet is not ssh

http://www.centos.org/docs/5/html/De...nt-config.html

newbie14 01-03-2012 11:38 AM

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?

repo 01-03-2012 11:43 AM

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

Kind regards

newbie14 01-03-2012 11:51 AM

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

repo 01-03-2012 11:53 AM

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

newbie14 01-03-2012 11:56 AM

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

repo 01-03-2012 11:59 AM

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

Kind regards

newbie14 01-03-2012 12:03 PM

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?

repo 01-03-2012 12:07 PM

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


All times are GMT -5. The time now is 11:01 PM.