Sha256: 56ed1dcd24817355b46a45cfa708b836adaa8cb1ddbdc6fa65c97ef5673225c0
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
require "vagrant/util/shell_quote" module VagrantPlugins module GuestDarwin module Cap class RemovePublicKey def self.remove_public_key(machine, contents) contents = contents.chomp contents = Vagrant::Util::ShellQuote.escape(contents, "'") machine.communicate.tap do |comm| if comm.test("test -f ~/.ssh/authorized_keys") comm.execute( "sed -i '' '/^.*#{contents}.*$/d' ~/.ssh/authorized_keys") end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cloudstack-1.2.0 | vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/guests/darwin/cap/remove_public_key.rb |