SSH Config being ignored
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
using the core.remote module the /home/stanley/.ssh/config is being ignored. Not sure if I missed something.
STACKSTORM VERSION
[root@stackstorm centos]# st2 --version
st2 3.6.0, on Python 3.6.8
OS, environment, install method
New install, a beginner using shell script to get it up and running.
Steps to reproduce the problem
Configured /etc/st2/st2.conf with the below per "ssh troubleshooting" guide.
[system_user]
user = stanley
ssh_key_file = /home/stanley/.ssh/stanley_rsa
...
[ssh_runner]
remote_dir = /tmp
use_ssh_config = True
ssh_config_file_path = ~/.ssh/config
Expected Results
Remote cli execution success
Actual Results
It parses the config but then appears to ignore it.
Output from debug /var/log/st2/st2actionrunner.236327.log
2022-01-09 10:45:02,856 139706203665064 DEBUG base [-] Performing pre-run for runner: 621413db-2341-4fad-9224-c8feee1a3b0c
2022-01-09 10:45:02,856 139706203665064 DEBUG paramiko_ssh_runner [-] Entering BaseParallelSSHRunner.pre_run() for liveaction_id="61db02feeceae61645ed8184"
2022-01-09 10:45:02,857 139706203665064 INFO paramiko_ssh_runner [-] [BaseParallelSSHRunner="621413db-2341-4fad-9224-c8feee1a3b0c", liveaction_id="61db02feeceae61645ed8184"] Finished pre_run.
2022-01-09 10:45:02,857 139706154534456 DEBUG ip_utils [-] Non-bracket address. host_str: salt
2022-01-09 10:45:02,857 139706154534456 DEBUG parallel_ssh [-] Connecting to host. (host='salt',port='None',user='None',private_key='<redacted>')
2022-01-09 10:45:02,858 139706154534456 INFO paramiko_ssh [-] Parsed SSH config file contents: {'hostname': '172.16.0.146', 'user': 'centos', 'certificatefile': '~/.ssh/id_rsa-cert.pub'}
2022-01-09 10:45:02,869 139706154534456 DEBUG paramiko_ssh [-] Connecting to server (hostname='salt',port=22,username='centos',timeout=60)
2022-01-09 10:45:02,869 139706154534456 DEBUG paramiko_ssh [-] Connection info (conninfo={'hostname': 'salt', 'allow_agent': False, 'look_for_keys': False, 'timeout': 60, 'username': 'centos', 'port': 22, 'key_filename': '/home/stanley/.ssh/stanley_rsa'})
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the core.remote entry point, /etc/st2/st2.conf, and the paramiko_ssh runner shown in the log. Compare the parsed SSH configuration with the subsequent connection information, then verify the configured host settings are used and remote CLI execution succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100