add (Net::SSH::KnownHosts)

    # File lib/net/ssh/known-hosts.rb, line 84
        def add(host, key)
          dir = File.dirname(source)
          Dir.mkdir(dir, 0700) if !File.exists?(dir)

          File.open(source, "a") do |file|
            buffer = Net::SSH::Transport::OSSL::Buffer.new
            buffer.write_key(key)
            blob = [buffer.to_s].pack("m*").gsub(/\s/, "")
            file.puts "#{Array(host).join(',')} #{key.ssh_type} #{blob}"
          end
        end