Open non7top opened 5 years ago
I filed similar issue in the past: https://github.com/saltstack/salt/issues/32578
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Bump
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no longer marked as stale.
@saltstack/team-ssh can you help with some follow up here, please?
It's been over a year now and https://docs.saltstack.com/en/getstarted/ssh/connect.html is still nowhere near working out of the box. Why?
Not only is it incomplete, but also key log_file
would need to be ssh_log_file
to have an effect, as demonstrated by @non7top's Saltfile
above.
This minimal setup helped me getting salt-ssh -i '*' test.ping
to work as an unprivileged user, eventually:
# cat Saltfile
salt-ssh:
roster_file: ./roster
config_dir: .
ssh_log_file: ./log.txt
# cat master
root_dir: .
cachedir: ./cachedir
What does it take to get this fixed for the masses?
Had the same issues with salt-ssh 9000
. Ended up with this setup to execute masterless Saltstack configuration:
$ cat Saltfile
salt-ssh:
roster_file: roster.yml
config_dir: .
$ cat master
root_dir: salt-ssh
ssh_log_file: var/logs/salt-ssh.log
cachedir: var/cache
file_roots:
base:
- .
This puts everything salt-ssh related under salt-ssh/
which I can then add to .gitignore
.
https://docs.saltstack.com/en/getstarted/ssh/connect.html
If using Saltfile as suggested on the page, salt-ssh will not function because of numerous permissions issues. There are a lot of suggestions in the guide and in error messages to fix those with sudo, but sudo is not an option when running as non-root.
I had to check these additional sources to at least make that example work https://github.com/saltstack/salt/issues/8062 https://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
Saltfile
./etc/master (not sure about file_roots though)
Most troublesome part was to identify where to put
cachedir
after I found out about it, I triedcachedir
andssh_cachedir
inSaltfile
without any effect.There is also a discrepancy where Saltfile accepts relative paths with
./
, while ./etc/master converts./
to/
. Not sure if that is a bug worth submitting.Setup
python3 -m venv salt . salt/bin/activate pip install --upgrade pip wheel pip install salt-ssh
Steps to Reproduce Issue
Follow the guide
Versions Report