Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleExample how to create private/public key pair
linenumberstrue
# navigate to the Agent's <agent-data>/config/private directory
cd /var/sos-berlin.com/js7/agent/config/private

# create the agent.key private key file using "jobscheduler" as a passphrase, starting with: -----BEGIN RSA PRIVATE KEY-----
openssl genrsa -aes256 -passout pass:"jobscheduler" -out agent-pkcs1.key 2048

# convert key 4096 from pkcs#1 to pkcs#8, starting with: -----BEGIN ENCRYPTED PRIVATE KEY-----
openssl pkcs8 -inform PEM -topk8 -in agent-pkcs1.key -out agent.key

# extract the agent.pub public key file from agent.key private key file
openssl rsa -passin pass:"jobscheduler" -in agent.key -pubout > agent.pub

...

Code Block
languagebash
titleExample where to copy the public key
linenumberstrue
# navigate to the Agent's <agent-data>/config directory
cd /var/sos-berlin.com/js7/agent/config

# copy the agent.pub public key file from the Agent in Step 1 to target Agents using scp or a file transfer tool

...

...

Code Block
languagebash
titleExample how to encrypt variables from a job
linenumberstrue
#!/bin/bash
set -e

# encrypt variable values using the target Agent's public key
##!include CryptoCryptoShell

EncryptVariable myVar1 "secret1"
EncryptVariable myVar2 "secret2"

...