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

[compute] disable password auth for current user, rather than always root

This commit is contained in:
geemus 2011-01-31 17:42:53 -08:00
parent 9d017d8ab6
commit 3784effdd1
4 changed files with 4 additions and 4 deletions

View file

@ -155,7 +155,7 @@ module Fog
commands = [
%{mkdir .ssh},
%{passwd -l root},
%{passwd -l #{username}},
%{echo "#{attributes.to_json}" >> ~/attributes.json}
]
if public_key

View file

@ -99,7 +99,7 @@ module Fog
Fog::SSH.new(ips.first['address'], username, credentials).run([
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
%{passwd -l root},
%{passwd -l #{username}},
%{echo "#{attributes.to_json}" >> ~/attributes.json}
])
rescue Errno::ECONNREFUSED

View file

@ -94,7 +94,7 @@ module Fog
Fog::SSH.new(addresses['public'].first, username, credentials).run([
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
%{passwd -l root},
%{passwd -l #{username}},
%{echo "#{attributes.to_json}" >> ~/attributes.json},
%{echo "#{metadata.to_json}" >> ~/metadata.json}
])

View file

@ -85,7 +85,7 @@ module Fog
Fog::SSH.new(addresses.first, username, credentials).run([
%{mkdir .ssh},
%{echo "#{public_key}" >> ~/.ssh/authorized_keys},
%{passwd -l root},
%{passwd -l #{username}},
%{echo "#{attributes.to_json}" >> ~/attributes.json}
])
rescue Errno::ECONNREFUSED