New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.7.5: parse_ssh_config failing in ssh_util.py #2496
Comments
Launchpad user Mark Horstman(mah042) wrote on 2014-11-10T20:07:05.209384+00:00 Launchpad attachments: files.zip |
Launchpad user Mark Horstman(mah042) wrote on 2014-11-10T22:07:03.310794+00:00 It seems to have something to do with the last line I added to /etc/ssh/sshd_config: If I remove that line, parse_ssh_config() in ssh_util.py no longer fails |
Launchpad user Anthony D'Atri(aad-r) wrote on 2014-11-10T23:50:56+00:00 I've experienced issues with 2.7.4 and a similar append of lines to sshd_config. cloud-init appears to eat a terminal newline, leaving the file without one, which alone can cause problems that are only made worse by future edits like: echo "PermitRootLogin without-password" >>/etc/ssh/sshd_config in that this can result in the last line of the file looking like: ServerAliveInterval 300PermitRootLogin without-password which prevents sshd from starting at next reboot. I've taken to echoing several blank lines onto the end of the file to avoid this. --aad
|
Launchpad user Mark Horstman(mah042) wrote on 2014-11-11T15:40:40.073528+00:00 It would seem cloud-init doesn't like the "=" in "PermitRootLogin=no" in /etc/ssh/sshd_config. Also, something, I assume cloud-init, is removing the last from /etc/ssh/sshd_config. If I change the /etc/ssh/sshd_config line I added from: it no longer fails. Sshd does not complain about the "=". It would seem cloud-init can't deal with "=" as var/val assignments in /etc/ssh/sshd_config and it's erroneously removing the last from the file (/etc/ssh/sshd_config). This is strictly a guess based upon the behavior observed through trial and error, I have not examined the source code. |
Launchpad user Dan Watkins(oddbloke) wrote on 2014-11-12T13:26:37.971075+00:00 I'm looking at fixing the '=' problem now. |
Launchpad user Dan Watkins(oddbloke) wrote on 2014-11-12T13:57:13.038010+00:00 The attached branch should fix the '=' problem. |
Launchpad user Scott Moser(smoser) wrote on 2016-08-10T14:59:12.810658+00:00 This is fixed in cloud-init 0.7.7. |
This bug was originally filed in Launchpad as LP: #1391303
Launchpad details
Launchpad user Mark Horstman(mah042) wrote on 2014-11-10T20:07:05.209384+00:00
I've been successfully using cloud-init 0.7.4 in a centos 6.5 image I created under an icehouse environment we're running. When I recently created a new centos 6.5 image and yum installed cloud-init (from http://download.fedoraproject.org/pub/epel/6/x86_64) , I got 0.7.5 (cloud-init.x86_64 0:0.7.5-10.el6.centos.2). 0.7.5 is failing in places 0.7.4 wasn't like setting up the ssh keys for the user. I turned on DEBUG for cloud-init console logging in /etc/cloud/cloud.cfg.d/05_logging.cfg:
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=arg0Formatter
args=(sys.stderr,)
and here's /var/log/cloud-init-output.log http://pastebin.ubuntu.com/8869713/
Attached is a zip file containing copies of my /etc/ssh/sshd_config temporary keys I used that were generated via the OpenStack gui.
The text was updated successfully, but these errors were encountered: