Home > Linux > SSH one-liner PermitRootLogin

SSH one-liner PermitRootLogin

December 17, 2013

# sed -i 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config

s/regexp/replacement/
Attempt to match regexp against the pattern space. If success- ful, replace that portion matched with replacement. The replacement may contain the special character & to refer to that portion of the pattern space which matched, and the special escapes \1 through \9 to refer to the corresponding matching sub-expressions in the regexp.

Advertisements
Categories: Linux Tags: , , ,
%d bloggers like this: