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:
parent
0bb807fbde
commit
c1c0c5de1a
1 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,16 @@ module Fog
|
|||
service.servers.merge_attributes(data)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue