Sha256: 82a0018682e3b70c5916d9da0e1a18e37b1bb0e4c41bad73a8f125b40ec2966c
Contents?: true
Size: 500 Bytes
Versions: 7
Compression:
Stored size: 500 Bytes
Contents
require "vagrant/util/shell_quote" module VagrantPlugins module GuestOpenWrt module Cap class InsertPublicKey def self.insert_public_key(machine, contents) contents = contents.chomp contents = Vagrant::Util::ShellQuote.escape(contents, "'") machine.communicate.tap do |comm| comm.execute <<~EOH printf '#{contents}\\n' >> /etc/dropbear/authorized_keys EOH end end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems