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 192.168.1.84 22

but to no avail: -

Trying 192.168.1.84...
...

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

netstat -anp | grep 'LISTEN' | grep 22

which returned: -

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

and: -

pgrep sshd

which returned: -

17611

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: -

Trying 192.168.1.84...
Connected to 192.168.1.84.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.2

as did ssh: -


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


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

No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...