Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

kloud/userdata: create .ssh on behalf of user #8619

Closed

Description

@rjeczalik

In order to inject a public key, known host etc. one needs to init .ssh directory in a template like:

        export SSH_DIR="/home/${var.koding_user_username}/.ssh"
        mkdir -p $SSH_DIR
        touch $SSH_DIR/authorized_keys
        chown -R ${var.koding_user_username}:${var.koding_user_username} $SSH_DIR
        chmod 700 $SSH_DIR
        chmod 600 $SSH_DIR/authorized_keys

If we move that part to be always executed before user_data, we'd spare a few lines on each template.

/cc @szkl @cihangir wdyt?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. cihangir commented on Jul 27, 2016

    @cihangir
    Contributor

    sounds good to me

  2. szkl commented on Aug 22, 2016

    @szkl

    👍

  3. rjeczalik commented on Apr 9, 2017

    @rjeczalik
    ContributorAuthor

    Superseded by #10935 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions