1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Trying to get ssh command working.

This commit is contained in:
Nat Welch 2013-04-30 15:00:05 -07:00
parent 0bb807fbde
commit c1c0c5de1a

View file

@ -60,6 +60,16 @@ module Fog
service.servers.merge_attributes(data) service.servers.merge_attributes(data)
end end
def setup(credentials = {})
requires :public_ip_address, :identity, :public_key, :username
Fog::SSH.new(public_ip_address, username, credentials).run([
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
])
rescue Errno::ECONNREFUSED
sleep(1)
retry
end
end end
end end
end end