hvbuild_post()
{
# Disabling root logins
- sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config
+ sed -i -e "s!^#\(PermitRootLogin\).*!\1 no!g" /etc/ssh/sshd_config
# Enabling X11 forwarding
- sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config
+ echo "XAuthLocation /usr/bin/xauth" >> /etc/ssh/sshd_config
+ sed -i -e "s!^#\(X11Forwarding\).*!\1 yes!g" /etc/ssh/sshd_config
+ sed -i -e "s!^#\(ForwardAgent\).*!\1 yes!g" /etc/ssh/ssh_config
+ sed -i -e "s!^#\(ForwardX11\).*!\1 yes!g" /etc/ssh/ssh_config
# Setting MaxAuthTries to 2
sed -i -e "s!^[#]*MaxAuthTries.*!MaxAuthTries 3!g" /etc/ssh/sshd_config