I'm installing a fresh openSUSE 13.1 with an autoyast xml file. I can't find the correct way to enable ssh and open the port in the firewall; the "Confirmation" screen shows that SSH service will be disabled, SSH port will be blocked.

I already tried:

    <services config:type="list">

without success...


Just put @mavillian commands systemctl enable sshd and systemctl start sshd In post-scripts section


    <post-scripts config:type="list">
        <debug config:type="boolean">true</debug>
            systemctl enable sshd.service
            systemctl start sshd.service

a) get your current autoyast setup or verify you already have it with

cd /root
mv autoinst.xml autoinst.xml.save
yast2 clone_system

b) assuming the move command above worked you can now do a diff of what autoyast made before (by default), and what you have now.

mv autoinst.xml autoinst.xml.old
yast2 firewall

Now go to "Allowed Services", then goto "Service to Allow" and choose "Secure Shell Server", then "Add", then "Next"

If it is what you want it to be, choose "Finish", otherwise choose "Back"

In your case I believe what you want to see is:

Firewall Starting
 *  Enable firewall automatic starting
 *  Firewall starts after the configuration gets written
Open Services, Ports, and Protocols
 +  Secure Shell Server           

After Finish, again run yast2 clone_system

Now, to see the differences that you need:

cp autoinst.xml autoinst.sshd.xml
diff -u autoinst.xml.old autoinst.sshd.xml

x070:~ # diff -u  autoinst.xml.old autoinst.sshd.xml
--- autoinst.xml.old    2016-12-05 20:51:00.000000000 +0100
+++ autoinst.sshd.xml   2016-12-05 20:54:38.000000000 +0100
@@ -52,7 +52,7 @@
     <FW_DEV_EXT>any eth0</FW_DEV_EXT>
@@ -89,8 +89,8 @@
-    <enable_firewall config:type="boolean">false</enable_firewall>
-    <start_firewall config:type="boolean">false</start_firewall>
+    <enable_firewall config:type="boolean">true</enable_firewall>
+    <start_firewall config:type="boolean">true</start_firewall>
     <ask-list config:type="list"/>

So, the key lines are:

    <enable_firewall config:type="boolean">true</enable_firewall>
    <start_firewall config:type="boolean">true</start_firewall>
  • Nice, this is a plausible way of doing things. Since I asked this question almost 3 years ago and I am not working with OpenSUSE anymore (ARCH now), I cannot test this and therefore can/will not indicate this as a solution. Thanks anyway! – intrixius Dec 6 '16 at 7:11
  • my pleasure. I am (only recently) working with several distros - sles and opensuse among them, and I was having a terrible time figuring out how to work with autoyast. imho, kickstart is easier to edit -BUT- I would have a much harder time trying to clone a system using kickstart. i.e., each has their strengths and weaknesses. but I would have liked being marked as "solution" :joking: – Michael Felt Dec 7 '16 at 15:56

Since opensuse uses systemd you can try systemctl enable sshd and systemctl start sshd as root or with sudo

  • As this is a headless installation, how can I do this in the autoyast file? And will the firewall also be altered, will the ssh port be opened? – intrixius Jan 31 '14 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.