GithubHelp home page GithubHelp logo

sapcc / nova-password Goto Github PK

View Code? Open in Web Editor NEW
4.0 33.0 2.0 4.98 MB

A tool to decrypt the admin password generated for the VM

License: Apache License 2.0

Makefile 7.56% Go 92.44%
nova openstack-nova password decryption rsa openstack

nova-password's Introduction

Usage

Get the admin password for an OpenStack server

Usage:
  nova-password <server-name>|<server-id> [<server-name>|<server-id>...] [flags]

Flags:
  -d, --debug                     print out request and response objects
  -h, --help                      help for nova-password
  -i, --private-key-path string   a path to the RSA private key (PuTTY and OpenSSH formats) (default "~/.ssh/id_rsa")
  -q, --quiet                     quiet (no extra output)
      --version                   version for nova-password
  -w, --wait uint                 wait for the password timeout in seconds

Prerequisites

  • The private key corresponding to the public key, used to create a compute instance, is required
  • Only RSA PKCS #1 v1.5 is supported by OpenStack

TLS options

  • OS_CACERT - environment variable with a path to custom CA certificate.
  • OS_INSECURE - skip endpoint TLS certificate validation. Set to true only if you are otherwise convinced of the OpenStack endpoint's authenticity.

Windows

.\openrc.ps1
.\nova-password.exe --private-key-path C:\Users\user\key.pem my-server
# or
.\nova-password.exe 717433dc-4c2e-4d62-9467-6dd3715b2c6c server-name
# or
.\nova-password.exe my-server -i C:\Users\user\.ssh\putty.ppk

nova-password's People

Contributors

dependabot[bot] avatar kayrus avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

otzoran rushins

nova-password's Issues

fail when instance doesn't exist

when I call the tool with an instance that doesn't exist it returns with error code 0
Can we make it return with an error code > 0 in case instance doesn't exist

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

gomod
go.mod
  • go 1.20
  • github.com/google/uuid v1.6.0
  • github.com/gophercloud/gophercloud v1.3.0
  • github.com/gophercloud/utils v0.0.0-20230523080330-de873b9cf00d@de873b9cf00d
  • github.com/kayrus/putty v1.0.4
  • github.com/spf13/cobra v1.8.0
  • github.com/spf13/viper v1.18.2
  • golang.org/x/crypto v0.22.0
  • golang.org/x/term v0.19.0

  • Check this box to trigger a request for Renovate to run again on this repository

Issue logging on to windows server via my laptop...

Hello

IM really struggling with this connection

im trying to connect from my windows laptop to my windows server instance?

i downloaded the nova-password and it runs fine. I downloaded also ope4nstack RC file

what is this private key path below? where do i get it from?

nova-password <instance_name> -i <private_key_path>

also do I have to do below? i ran the RC from dos and it opened a notepad file? DO i have to change some things there?

Wait for password availability

Directly after creating a new instance (with terraform), the tool is returning an empty password though the machine exists.
Maybe one can introduce 2 parameters to wait for the password to become available.
-w, --wait Wait for the password to become available
-t, --timeout Timeout in seconds to wait for password

SNI is not supported.

When specifying a domain name, I receive the following error :

2020/03/03 10:12:20 [DEBUG] OpenStack connection error, retries exhausted. Aborting
Error: Post https://URLREMOVED: OpenStack connection error, retries exhausted. Aborting. Last error was: x509: certificate signed by unknown authority

Make the tool scriptable

Currently the nova-password tool produces a lot of output which makes parsing a bit tricky (using awk, to get only the third line and then hope that the 5th word is the password).
I propose something like a -b (--batch) switch that will omit any output and just print the passwords in the order of given servers.

Our use case:
We want to setup windows machines with terraform. We need to attach disks to the instance but initially the disks are offline. So to take online and format the disks we need to remote-exec for which we need the Administrator password. Using an external data source we can get the password during the terraform run and the do a remote exec with winrm.

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.