]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: no extra newline needed in authorized_keys file 31270/head
authorSage Weil <sage@redhat.com>
Wed, 30 Oct 2019 19:09:36 +0000 (14:09 -0500)
committerSage Weil <sage@redhat.com>
Wed, 30 Oct 2019 19:09:36 +0000 (14:09 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index a2ed360964caeaf0be821c14805848319c5951da..a5c708e9655813e98e976e84945a83989648f729 100755 (executable)
@@ -1064,7 +1064,7 @@ def command_bootstrap():
         logger.info('Adding key to root@localhost\'s authorized_keys...')
         with open('/root/.ssh/authorized_keys', 'a') as f:
             os.fchmod(f.fileno(), 0o600)  # just in case we created it
-            f.write(ssh_pub + '\n')
+            f.write(ssh_pub.strip() + '\n')
 
         logger.info('Enabling ssh module...')
         CephContainer(