From 3ad33e3930f6d606b8fb816c1589a1fe841fc819 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sun, 9 Jun 2013 22:28:46 -0400 Subject: [PATCH] Fixed bug with ssh and remote X11 --- stage3/pkg/openssh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stage3/pkg/openssh b/stage3/pkg/openssh index 726639d..58707ce 100644 --- a/stage3/pkg/openssh +++ b/stage3/pkg/openssh @@ -21,10 +21,13 @@ hvconfig_pre() 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 -- 2.20.1