Get known_hosts from Chromiumʼs Secure Shell Client (nassh)

If you have used Chromiumʼs Secure Shell Client, you may want to get a copy of the known_hosts file it has created. This JavaScript code will print the known_hosts file contents to the DevTools console:

term_.command.sshDirectoryEntry_.filesystem.root.getFile('.ssh/known_hosts',{},function(a){a.file(function(b){var c=new FileReader();c.onloadend=function(d){console.log(this.result)};c.readAsText(b)})})