/etc/sysconfig/sshd will not be a shell script in CentOS 7 anymore so all 'export VARIABLE=VALUE' has to be changed to 'VARIABLE=VALUE'. # sed -i 's/^export //' /etc/sysconfig/sshd There is the /root/preupgrade/cleanconf//etc/sysconfig/sshd with the fixed configuration.