Last active
August 29, 2015 14:06
-
-
Save brunoborges/e0236a55fe42f2d1cb62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Util script to encrypt a password on a remote WebLogic domain through SSH | |
REMOTE_DOMAIN_HOME=/home/bruno/Work/tools/oracle/mw1212/user_projects/domains/base_domain | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
PRIVATE_KEYFILE=~/.ssh/id_rsa | |
ssh bruno@localhost -i $PRIVATE_KEYFILE DOMAIN_HOME=$REMOTE_DOMAIN_HOME PASSWORD=$1 '/bin/bash -s' <<'ENDSSHSESSION' | |
cd $DOMAIN_HOME/bin | |
source setDomainEnv.sh | |
java weblogic.security.Encrypt $PASSWORD | |
ENDSSHSESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment