LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting Up a ssh server of Fedora 14 (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-a-ssh-server-of-fedora-14-a-878833/)

abaksh1 05-04-2011 02:20 PM

Setting Up a ssh server of Fedora 14
 
Hello all,

I am trying to set up a ssh server on my mom's box that is running Fedora 14. I have set the server up and when I am logged onto the box locally, it lets me log in. But when I try to shell in from my apartment some miles away, I get the following error:

ssh: connect to host 71.176.165.28 port 22: No route to host

However, when I try to ping it, the machine is reachable, and traceroute likewise gives me a clear route to the remote machine. Obviously I have something misconfigured here, but what?

Can anyone help? Thanks in advance.

repo 05-04-2011 02:27 PM

Firewall, portforwarding at the router?
ISP is blocking port 22?

Kind regards

thund3rstruck 05-04-2011 08:42 PM

Quote:

Originally Posted by abaksh1 (Post 4346562)
ssh: connect to host 71.176.165.28 port 22: No route to host

However, when I try to ping it, the machine is reachable, and traceroute likewise gives me a clear route to the remote machine.

What is running @ 71.176.165.28? Is your mom's computer connected directly to the internet or behind a router? If she's on a router then you have to configure PortForwarding at the router to route traffic inbound from 22 to the machine. If she's connected directly to the Internet then the ISP might be blocking port 22 and you should be able to configure an alternate port.

Refer here to see if 22 is being blocked: http://www.canyouseeme.org/

repo 05-05-2011 02:34 AM

Make sure the ip is correct.
You can use nmap to see which ports are open and responding.
Code:

nmap -Pn 71.176.165.28
Kind regards

abaksh1 05-05-2011 06:21 AM

When I run nmap, I get the following output:

Starting Nmap 5.21 ( http://nmap.org ) at 2011-05-05 06:18 CDT
Nmap scan report for ip71.176.165.28.br.br.cox.net (71.176.165.28)
Host is up (0.019s latency).
All 1000 scanned ports on ip71.176.165.28.br.br.cox.net (71.176.165.28) are filtered

Nmap done: 1 IP address (1 host up) scanned in 5.14 seconds

What does all ports are filtered mean? I don't think we are behind a router. I have set up a server before using Ubuntu some time ago, and recently switched after the Unity business, so I think it must be something that I am doing wrong, you know? Thanks again for the input.

abaksh1 05-05-2011 06:30 AM

When I did another scan with: nmap -A -T4 71.176.165.28, I got:

Starting Nmap 5.21 ( http://nmap.org ) at 2011-05-05 06:28 CDT
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.03 seconds

It looks like it might be a firewall issue. I am not that familiar with Fedora's default firewall settings. I thought I had allowed connections to port 22, but evidently I got something wrong. Any ideas how I can check?

repo 05-05-2011 09:30 AM

Code:

ipables -L
Will give you the firewall rules on the server.
Quote:

I don't think we are behind a router.
You really should check this.

Kind regards

abaksh1 05-06-2011 10:10 AM

Here is the output of iptables -L command on my mom's box:

Chain INPUT (policy ACCEPT)

target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 state NEW udp dpt:mdns
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Now what precisely is this telling me?


All times are GMT -5. The time now is 09:23 PM.