2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-01-09 09:52:32 +00:00

Fix remoteshell compatibility with custom Match

If a user has a custom Match directive, remoteshell would
create an invalid configuration.  Fix by ensuring we are
outside of a match context by doing Match all explicitly.
This commit is contained in:
Jarrod Johnson
2018-12-13 16:39:55 -05:00
parent 54ebb36100
commit 919cae25af

View File

@@ -54,6 +54,7 @@ then
logger -t xcat -p local4.info "remoteshell: setup /etc/ssh/sshd_config and ssh_config"
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG
#delete all occurance of the attribute and then add xCAT settings
echo "Match all" >>/etc/ssh/sshd_config
sed -i '/X11Forwarding /'d /etc/ssh/sshd_config
echo "X11Forwarding yes" >>/etc/ssh/sshd_config
sed -i '/MaxStartups /'d /etc/ssh/sshd_config