Difference between revisions of "Sed delete key from known hosts"

From thelinuxwiki
Jump to: navigation, search
(Pushed from Themanclub.)
 

Latest revision as of 00:16, 21 March 2013

sed oneliner to delete offending key from known_hosts

error message from ssh client

Offending RSA key in /home/jsmith/.ssh/known_hosts:121

sed command specifying

sed -i '121d' /home/jsmith/.ssh/known_hosts

the above command will modify the known_hosts file in place with no backup