Created
May 2, 2014 12:24
-
-
Save schlomo/bc2e5ba3544d45c689c1 to your computer and use it in GitHub Desktop.
Simple sed patcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i -f - /etc/ssh/sshd_config <<EOF | |
1{ | |
i # this content comes from the %{name}-%{version}-%{release} package | |
i AddressFamily inet | |
i Protocol 2 | |
i LogLevel VERBOSE | |
i HostbasedAuthentication yes | |
i IgnoreUserKnownHosts yes | |
i IgnoreRhosts yes | |
i Banner /etc/ssh/banner.txt | |
i # end of content from the %{name}-%{version}-%{release} package | |
} | |
/Protocol/d | |
/LogLevel/d | |
/HostbasedAuthentication/d | |
/IgnoreUserKnownHosts/d | |
/IgnoreRhosts/d | |
/AddressFamily/d | |
/Banner/d | |
/%{name}.*package/d | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment