Sha256: 381ca6cac4fcef2400b73900191cc38d765525cbb9f44afc3ce3ab56f31b4438
Contents?: true
Size: 437 Bytes
Versions: 13
Compression:
Stored size: 437 Bytes
Contents
Capistrano.configuration(:must_exist).load do # set :user, (defined?(user) ? user : ENV['USER']) desc "Copies contents of ssh public keys into authorized_keys file" task :setup_ssh_keys do sudo "test -d ~/.ssh || mkdir ~/.ssh" sudo "chmod 0700 ~/.ssh" put(ssh_options[:keys].collect{|key| File.read(key+'.pub')}.join("\n"), File.join('/home', user, '.ssh/authorized_keys'), :mode => 0600 ) end end
Version data entries
13 entries across 13 versions & 1 rubygems