Code Monkey home page Code Monkey logo

Comments (1)

m0kct avatar m0kct commented on July 19, 2024

This is caused by the ec2-fetch-ssh-public-key script.

The following patch fixed it for me (not sure about that "doesn't work" comment, seems to work for me...):

diff --git a/ec2-fetch-ssh-public-key b/ec2-fetch-ssh-public-key
index 342a8ed..b9ce802 100755
--- a/ec2-fetch-ssh-public-key
+++ b/ec2-fetch-ssh-public-key
@@ -22,7 +22,6 @@ source $vyatta_env

Configuration commands

SHELL_API=/bin/cli-shell-api
-COMMIT=/opt/vyatta/sbin/my_commit
SAVE=/opt/vyatta/sbin/vyatta-save-config.pl
LOADKEY=/opt/vyatta/sbin/vyatta-load-user-key.pl

@@ -51,25 +50,11 @@ fi

load_ssh_public_key ()
{

  • Doesn't work.

  • if [ -x $vyatta_sbindir/vyatta-load-user-key.pl ]; then

  • log_action_msg "Loaded ssh public key for user $username"

  • sg ${group} -c "$vyatta_sbindir/vyatta-load-user-key.pl $username $public_key"

- # fi

  • Do this instead

  • Obtain session environment

  • Evaluate environment string

  • Setup the session

  • Commit and save config change

- # Tear down the session

 log_action_msg "EC2: Loaded ssh public key for user $username"
  • $LOADKEY $username $public_key_url
  • sg ${group} -c "$LOADKEY $username $public_key_url"
  • Commit and save to config.boot

  • $COMMIT
  • $SAVE
  • Save to config.boot

  • sg ${group} -c "$SAVE"
    }

Try to get the ssh public key from instance metadata

from vyos-build-ami.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.