Ubuntu Pastebin

Paste from frankban at Tue, 25 Oct 2016 11:36:03 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/sh

# Usage: juju-db
# Connect to the database holding the state of the current Juju controller.

password=`juju ssh -m controller 0 sudo grep statepassword: /var/lib/juju/agents/machine-0/agent.conf | cut -b16- | sed 's/\\r//g'`
echo password: $password
juju ssh -m controller 0 \
    sudo /usr/lib/juju/mongo3.2/bin/mongo 127.0.0.1:37017/admin --ssl \
    --sslAllowInvalidCertificates --sslPEMKeyPassword /var/lib/juju/shared-secret \
    --sslPEMKeyFile /var/lib/juju/server.pem -u machine-0 -p $password
Download as text