Comments (6)
If this is not explicitly documented then it's a documentation bug and ideally a PR opened against https://github.com/StackStorm/st2docs to fix it.
from st2.
REMOTE_RUNNER_PRIVATE_KEY_HEADER = "PRIVATE KEY-----".lower()
def _is_private_key_material(self, private_key):
return private_key and REMOTE_RUNNER_PRIVATE_KEY_HEADER in private_key.lower()
Does this help? Your key does not appear to contain the above header
from st2.
Could this https://docs.stackstorm.com/reference/runners.html?highlight=private%20key#id2 be any more explicit or is it sufficient?
from st2.
Hi, thank you both. Yes but than I add begin and end of the ssh key this error happen:
[ecordk_adm@testserver ~]$ st2 run core.remote cmd=ls hosts=testserver username=test_adm private_key=$KEY
usage: st2 [-h] [--version] [--url BASE_URL] [--auth-url AUTH_URL] [--api-url API_URL] [--stream-url STREAM_URL] [--api-version API_VERSION] [--cacert CACERT] [--basic-auth BASIC_AUTH] [--config-file CONFIG_FILE] [--print-config] [--skip-config] [--debug]
{run,action,action-alias,auth,login,whoami,apikey,execution,inquiry,key,pack,policy,policy-type,rule,webhook,timer,runner,sensor,trace,trigger,trigger-instance,rule-enforcement,workflow,service-registry,role,role-assignment} ...
st2: error: unrecognized arguments: -----END RSA PRIVATE KEY-----
So Iam confused at the moment what I did wrong here :/
from st2.
try to wrap the variable $KEY in ""
from st2.
@fdrab Thank you this was a very helpful tip.
Solution:
Read the Private Key so:
KEY=sudo cat /etc/st2/id_rsa | sed 's/\n//g'
(Without the line breaks not work correct for me)
Test with: echo "${KEY}"
st2 run core.remote cmd=ls hosts=tessystem username=test_adm private_key="${KEY}"
Add to Key Value Store:
st2 key set test_ssh_privat_key "$KEY" --encrypt
Use From Key Value Store:
st2 run core.remote cmd=ls hosts=tessystem username=test_adm private_key="{{ st2kv.system.test_ssh_privat_key | decrypt_kv }}"
@nzlosh Should I add it to the documentation? I thin could be interesting for other as well.
from st2.
Related Issues (20)
- tensorflow HOT 3
- st2client windows json parsing problems for create apikeys HOT 3
- Command Error: st2-run-pack-tests -c HOT 1
- nagios invalid triggertype
- No such file or directory: '/home/stanley/.ssh/stanley_rsa HOT 1
- Disable Rule show value of Secret Action Field
- JIRA SUBTASK action in JIRA pack HOT 1
- Eventlet retirement HOT 3
- Slack Channel Community Sign-Up Link seems to be broken HOT 1
- Pack integration testing skipped
- Renew test SSL CA + Cert HOT 2
- Custom Scopes for Key-Value Store + RBAC for that Scopes HOT 1
- Organisation fo ST2 HOT 4
- st2kv : Non-hexadecimal digit found
- All workerflow instances stop in running state
- create Pod stackstorm-ha-1709204765-mongodb-0 in StatefulSet stackstorm-ha-1709204765-mongodb failed error: pods "stackstorm-ha-1709204765-mongodb-0" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider "pipelines-scc": Forbidden: not usable by user or serviceaccount, provider "robusta-scc": Forbidden: not usable by user or serviceaccount, provider restricted-v2: .spec.securityContext.fsGroup: Invalid value: []int64{1001}: 1001 is not an allowed group, provider restricted-v2: .containers[0].runAsUser: Invalid value: 1001
- Provide support for passing "=" in a string
- MongoDB issue
- old pytz version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from st2.