Skip to content
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

(Digitalocean) SSH key with "\n" inside #10083

Closed
vaclavdobsicek opened this issue Nov 13, 2016 · 1 comment
Closed

(Digitalocean) SSH key with "\n" inside #10083

vaclavdobsicek opened this issue Nov 13, 2016 · 1 comment

Comments

@vaclavdobsicek
Copy link

Terraform Version

Terraform v0.7.10 (MAC)

Affected Resource(s)

  • digitalocean

Terraform Configuration Files

    ssh_keys = [ 
      "${var.ssh_fingerprint_axmn}"
    ]

Expected Behavior

There will be one one-lined ssh pub key in the /root/.ssh/authorized_keys

Actual Behavior

The first line is cut in the place of "\n" and the rest of the string is on the second row.
On the third row is the second row repeated again.

Steps to Reproduce

  1. Upload the SSH pub key which contains "\n" into security section in the Digitalocean control panel
  2. Use fingerprint of this key for creating droplet

Example

Source

        {
            "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiKopHX6PXJz7wilPm72pN2EQhwt0VIdcaokedede2byiGcvVjrY5k7FObEiX201YaCKgCg3A3k3SR/HuG2tH7Drf26uKYQnq+LEsgVxlcjl0lj+1RcKqQOguEJKXfcj3OrL\nIJrX66/Qlc0MDoVIFo1FWB/adYHa4OM= axmn"
        }

Result (authorized_keys on target machine)

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiKopHX6PXJz7wilPm72pN2EQhwt0VIdcaokedede2byiGcvVjrY5k7FObEiX201YaCKgCg3A3k3SR/HuG2tH7Drf26uKYQnq+LEsgVxlcjl0lj+1RcKqQOguEJKXfcj3OrL
IJrX66/Qlc0MDoVIFo1FWB/adYHa4OM= axmn
IJrX66/Qlc0MDoVIFo1FWB/adYHa4OM= axmn
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants