Saturday, 4 October 2014

Ah, SSH from Mac OS X to OpenSuSE - The firewall, (s)he say "No"

So I was trying to work out why I wasn't able to SSH from my Mac to my new server running OpenSuSE 13.1.

This is what I was doing: -

but that was simply timing out.

I then tried telnet e.g.

telnet 22

but to no avail: -


On the SuSE box, I confirmed that sshd was running: -

netstat -anp | grep 'LISTEN' | grep 22

which returned: -

tcp 0* LISTEN 17611/sshd
tcp 0 0 ::22 :::* LISTEN 17611/sshd

and: -

pgrep sshd

which returned: -


As ever, a quick Google search for openlinux firewall which brought me here: -

I was wondering… why I can't connect through ssh. sshd daemon is running fine, so I found out that OpenSuSE installs its stikin' firewall by default and blocks everything. I'm pretty well protected behind enough high end security devices, and don't need to micro-manage my connection. Here is how I disabled the firewall altogether:

/sbin/SuSEfirewall2 off

To start the firewall:

/sbin/SuSEfirewall2 on

If you want to temporarily disable your firewall:

/etc/init.d/SuSEfirewall2_setup stop

Enter the above line without "stop" and you will see all available switches.


Lo and behold, once I did the same on the OpenSuSE box: -

/sbin/SuSEfirewall2 off

telnet worked: -

Connected to
Escape character is '^]'.

as did ssh: -

Last login: Sat Oct  4 19:42:44 2014 from
Have a lot of fun...

I did, of course, bring the firewall back up again when I'd finished ......

No comments: