Skip to content
This repository was archived by the owner on Nov 25, 2017. It is now read-only.

The use of authorized_keys2 for protocol 2 has been deprecated and is no longer supported by some distros #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openstack/compute/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def do_boot(self, args):

if keyfile:
try:
files['/root/.ssh/authorized_keys2'] = open(keyfile)
files['/root/.ssh/authorized_keys'] = open(keyfile)
except IOError, e:
raise CommandError("Can't open '%s': %s" % (keyfile, e))

Expand Down Expand Up @@ -487,4 +487,4 @@ def main():
ComputeShell().main(sys.argv[1:])
except CommandError, e:
print >> sys.stderr, e
sys.exit(1)
sys.exit(1)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

requirements = ['httplib2', 'argparse', 'prettytable']
requirements = ['httplib2==0.7.4', 'argparse==1.2.1', 'prettytable==0.5']
if sys.version_info < (2,6):
requirements.append('simplejson')

Expand Down Expand Up @@ -37,4 +37,4 @@ def read(fname):
entry_points = {
'console_scripts': ['openstack-compute = openstack.compute.shell:main']
}
)
)
4 changes: 2 additions & 2 deletions tests/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_shell_call():
'POST', '/servers',
{'server': {'flavorId': 1, 'name': 'some-server', 'imageId': 1,
'personality': [{
'path': '/root/.ssh/authorized_keys2',
'path': '/root/.ssh/authorized_keys',
'contents': ('SSHKEY').encode('base64')},
]}
}
Expand All @@ -129,7 +129,7 @@ def test_boot_key_file():
'POST', '/servers',
{'server': {'flavorId': 1, 'name': 'some-server', 'imageId': 1,
'personality': [
{'path': '/root/.ssh/authorized_keys2', 'contents': expected_file_data},
{'path': '/root/.ssh/authorized_keys', 'contents': expected_file_data},
]}
}
)
Expand Down