我正在安装一个带有autoyast文件的新的openSUSE 13.1。我找不到正确的方法来启用ssh并在防火墙中打开端口;“确认”屏幕显示SSH service will be disabled, SSH port will be blocked。
我已经试过了
<runlevel>
<services config:type="list">
<service>
<service_name>sshd</service_name>
<service_status>enable</service_status>
</service>
</services>
</runlevel>没有成功..。
发布于 2016-03-03 13:23:56
只需将@mavillian命令systemctl enable sshd和systemctl start sshd放在后脚本部分即可
<scripts>
<post-scripts config:type="list">
<script>
<filename>setupssh.sh</filename>
<interpreter>shell</interpreter>
<debug config:type="boolean">true</debug>
<source><![CDATA[
systemctl enable sshd.service
systemctl start sshd.service
]]></source>
</script>
</post-scripts>
</scripts>发布于 2016-12-05 19:59:41
( a)获取当前的自动安装程序,或验证您已经使用了
cd /root
mv autoinst.xml autoinst.xml.save
yast2 clone_system( b)假设上面的move命令有效,现在您可以对autoyast以前所做的操作(默认情况下)和现在的内容进行区分。
mv autoinst.xml autoinst.xml.old
yast2 firewall现在转到“允许的服务”,然后转到“服务允许”,然后选择“安全Shell服务器”,然后“添加”,然后选择“下一步”
如果这是你想要的,选择“完成”,否则选择“返回”。
Firewall Starting
* Enable firewall automatic starting
* Firewall starts after the configuration gets written
...
Open Services, Ports, and Protocols
+ Secure Shell Server 在Finish之后,再次运行yast2 clone_system
现在,要了解您需要的不同之处:
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_ALLOW_FW_BROADCAST_EXT>no</FW_ALLOW_FW_BROADCAST_EXT>
<FW_ALLOW_FW_BROADCAST_INT>no</FW_ALLOW_FW_BROADCAST_INT>
<FW_CONFIGURATIONS_DMZ></FW_CONFIGURATIONS_DMZ>
- <FW_CONFIGURATIONS_EXT></FW_CONFIGURATIONS_EXT>
+ <FW_CONFIGURATIONS_EXT>sshd</FW_CONFIGURATIONS_EXT>
<FW_CONFIGURATIONS_INT></FW_CONFIGURATIONS_INT>
<FW_DEV_DMZ></FW_DEV_DMZ>
<FW_DEV_EXT>any eth0</FW_DEV_EXT>
@@ -89,8 +89,8 @@
<FW_SERVICES_INT_RPC></FW_SERVICES_INT_RPC>
<FW_SERVICES_INT_TCP></FW_SERVICES_INT_TCP>
<FW_SERVICES_INT_UDP></FW_SERVICES_INT_UDP>
- <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>
</firewall>
<general>
<ask-list config:type="list"/>因此,重点是:
<firewall>
<enable_firewall config:type="boolean">true</enable_firewall>
<start_firewall config:type="boolean">true</start_firewall>
<FW_CONFIGURATIONS_EXT>sshd</FW_CONFIGURATIONS_EXT>
</firewall>发布于 2014-01-30 18:46:07
由于opensuse使用systemd,所以您可以尝试使用systemctl enable sshd和systemctl start sshd作为root或使用sudo。
https://unix.stackexchange.com/questions/111675
复制相似问题