mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-14 07:10:21 +00:00
Fix remoteshell compatibility with custom Match (#5936)
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:
@@ -59,6 +59,7 @@ then
|
||||
logger -t $log_label -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
|
||||
|
Reference in New Issue
Block a user