Ask Your Question

ssh fails to connect- fedora 19

asked 2013-09-23 12:04:29 -0600

Bharat gravatar image

updated 2013-09-24 06:51:53 -0600

FranciscoD_ gravatar image

I just updated from fedora 17 to fedora 19 using fedup in both my laptop and desktop. Somehow ssh is not working in both my laptop and desktop.

In both systems I ensured the following:

  1. Ports defined in /etc/ssh/sshd.config
  2. SELINUX set to permissive
  3. Enabled and started ssh by /sbin/services sshd start
  4. Checked ssh status with systemctl status sshd.service and it says that Server listening on :: port 9022
  5. Also added port in semanage

It still doesn' t work (No route to host)

Laptop is on wifi and the cables and connections are fine since I can connect to the internet.



Routing table:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         UG        0 0          0 wlp3s0    *        U         0 0          0 wlp3s0

pinging the desktop gives no problems:

21 packets transmitted, 21 received, 0% packet loss, time 20027ms
rtt min/avg/max/mdev = 2.118/21.040/128.028/38.759 ms

Desktop to laptop ping also works.

Desktop routing table:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         UG        0 0          0 em1    *        U         0 0          0 em1

I couldn't open firewall settings though (both in laptop and desktop): If try I open it from the menu or from commandline (system-config-firewall) it says: ERROR: FirewallD is active, please use firewall-config

I don't have much idea about how to configure firewall from commandline.

What could be wrong ?


ssh -v host -p 9022 returns this:

OpenSSH_6.2p2, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
debug1: Connecting to [] port 9022.
debug1: connect to address port 9022: No route to host
ssh: connect to host port 9022: No route to host
edit retag flag offensive close merge delete


What does ssh -v host -p 9022 say?

nonamedotc gravatar imagenonamedotc ( 2013-09-23 12:08:39 -0600 )edit

well.. fine i solved it.. it was a problem with the firewall.. i deleted and redefined the port :P

Bharat gravatar imageBharat ( 2013-09-23 13:16:31 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2013-09-23 13:13:33 -0600

nonamedotc gravatar image

Ok! Did you change the ssh port on the firewall? Try the following as root.


This will open the FirewallD GUI.

  • In the drop-down box below the menu bar, change to Permanent Configuration.
  • Change to Services tab
  • Navigate to ssh service on the left panel and select it. This should show the relevant port on the right side panel.
  • Click on the available entry, click Edit button (bottom of the right panel) and change the port number to what you have assigned in sshd_config.
  • Reload firewalld from the menu.

This should get ssh working. Hope this helps.

edit flag offensive delete link more

answered 2013-09-24 01:35:33 -0600

abkumar gravatar image

also if the selinux is enable/enforcing. Please try the below command to enable the new port.

#semanage port -a -t ssh_port_t -p tcp 9022
edit flag offensive delete link more

answered 2013-09-24 09:00:44 -0600

Bharat gravatar image

Well.. thank you all. but it seems it was a firewall problem.

I stopped firewall, redefined the ports and it's working now.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-09-23 12:04:29 -0600

Seen: 10,182 times

Last updated: Sep 24 '13