From 184cb6cb1431acfeec02caadf51fce246141e3cb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 16 Nov 2010 15:40:20 -0800 Subject: Add ability to configure SSH listen address Bug 2410 Add ability to add configure listen address in ssh_config. set service ssh listen-address 1.2.4.40 Multiple values are allowed, and works for both IPv4 and IPv6 --- scripts/rl-system.init | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/rl-system.init') diff --git a/scripts/rl-system.init b/scripts/rl-system.init index fc328b7b..b73befba 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -179,10 +179,13 @@ security_reset () { # Disable root login over telnet sed -i -e '/^# Pseudo-terminal (telnet)/,$d' /etc/securetty - # Disable root login with ssh - # Renable DNS validation + # Restore default sshd config + # Disable root login with ssh + # Renable DNS validation + # Remove Listen addresses sed -i -e '/^PermitRootLogin/s/yes/no/' \ - -e '/^UseDNS/s/no/yes/' /etc/ssh/sshd_config + -e '/^UseDNS/s/no/yes/' \ + -e '/^ListenAddress/d' /etc/ssh/sshd_config } start () { -- cgit v1.2.3