SALT-SSH(1)

SALT-SSH(1) πŸ’…βœ¨

okay bestie, sit DOWN, because this is the Salt manual page for salt-ssh and it's genuinely so good. no cap.


✨ NAME ✨

salt-ssh β€” the salt-ssh documentation, aka ur new bestie for running salt stuff without a full master/minion glow-up πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

salt-ssh '*' [ options ] sys.doc

salt-ssh -E '.*' [ options ] sys.doc cmd

πŸ’– DESCRIPTION πŸ’–

Salt SSH lets you run salt routines using nothing but SSH as the transport. that's it. that's the whole vibe. no minion install arc required, we're going in through the front door πŸšͺ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • --version β€” prints the version of Salt that's running, so you know exactly what u got πŸ’œ
  • --versions-report β€” shows the program's dependencies and version number, then dips out. cute lil exit.
  • -h, --help β€” shows the help message and exits, the classic "just tell me what to do" button 🌸
  • -c CONFIG_DIR, --config-dir=CONFIG_dir β€” where the Salt config directory lives. this dir holds the config files for the Salt master and minions. on most systems the default is /etc/salt. 🏠
  • --hard-crash β€” raise any original exception instead of exiting gracefully. Default: False. it's giving "no, actually, let it crash, I want to SEE it" πŸ’€
  • -r, --raw, --raw-shell β€” execute a raw shell command. straight up, no filter.
  • --roster β€” pick which roster system to use. this decides whether you're running a database backend, a scanner, or a custom roster system. the default is the flat file roster. πŸ“‹
  • --roster-file β€” set an alternative location for the default roster file location. the default roster file is called roster and it lives in the same directory as the master config file.

New in version 2014.1.0. πŸŽ‚

  • --refresh, --refresh-cache β€” force a refresh of the master side data cache of the target's data. you need this if a target's grains got changed and the auto refresh timeframe hasn't hit yet. ⏰
  • --max-procs β€” sets how many minions you're talking to concurrently. this value defines how many processes get opened up at a time to manage connections β€” more running processes means communication should be faster. default is 25. πŸƒβ™€οΈπŸ’¨
  • --extra-filerefs=EXTRA_FILEREFS β€” pass in extra files to include in the state tarball. πŸ“¦
  • --min-extra-modules=MIN_EXTRA_MODS β€” one or a comma-separated list of extra Python modules to be included into Minimal Salt. (the original page writes "modulesto", bless, but u know what it means 🫢)
  • --thin-extra-modules=THIN_EXTRA_MODS β€” one or a comma-separated list of extra Python modules to be included into Thin Salt. 🧚
  • -v, --verbose β€” turns on command verbosity, displays the jid. loud and proud πŸ”₯
  • -s, --static β€” return the data from minions as a group after they all return. one big wholesome pile instead of a drip feed.
  • -w, --wipe β€” removes the deployment of the salt files when done executing. we leave no trace πŸ’…
  • -W, --rand-thin-dir β€” picks a random temp dir to deploy on the remote system. the dir gets cleaned after execution. sparkle and vanish ✨
  • -t, --regen-thin, --thin β€” trigger a thin tarball regeneration. you need this if custom grains/modules/states have been added or updated.
  • --python2-bin=PYTHON2_BIN β€” path to a python2 binary which has salt installed. 🐍
  • --python3-bin=PYTHON3_BIN β€” path to a python3 binary which has salt installed. 🐍🐍
  • --jid=JID β€” pass a JID to be used instead of generating one.
  • --pre-flight β€” run the ssh_pre_flight script defined in the roster. by default this script only runs if the thin dir does not exist on the target minion. this option forces the script to run regardless of whether the thin dir exists or not. πŸ›«

πŸ” Authentication Options πŸ”

  • --priv=SSH_PRIV β€” specify the SSH private key file to be used for authentication. πŸ”‘
  • --priv-passwd=SSH_PRIV_PASSWD β€” specify the SSH private key file's passphrase if need be.
  • -i, --ignore-host-keys β€” by default ssh host keys are honored and connections will ask for approval. use this option to disable StrictHostKeyChecking. πŸ™ˆ
  • --no-host-keys β€” fully ignores ssh host keys, which by default are honored and connections would ask for approval. useful if the host key of a remote server has changed and would still error with --ignore-host-keys. the nuclear option, respectfully πŸ’₯
  • --user=SSH_USER β€” set the default user to attempt to use when authenticating. πŸ§‘πŸ’»
  • --passwd β€” set the default password to attempt to use when authenticating.
  • --askpass β€” interactively ask for the SSH password with no echo. this avoids the password ending up in process args and stored in history. secret secret 🀫
  • --key-deploy β€” set this flag to attempt to deploy the authorized ssh key with all minions. combined with --passwd this can make initial deployment of keys very fast and easy. speedrun strat 🏁
  • --identities-only β€” use the only authentication identity files configured in the ssh_config files. see the IdentitiesOnly flag in man ssh_config.
  • --sudo β€” run command via sudo. πŸ‘‘

πŸ“‘ Scan Roster Options πŸ“‘

  • --scan-ports=SSH_SCAN_PORTS β€” comma-separated list of ports to scan in the scan roster.
  • --scan-timeout=SSH_SCAN_TIMEOUT β€” scanning socket timeout for the scan roster. ⏳

πŸ“ Logging Options πŸ“

Logging options which override any settings defined on the configuration files. these ones are the boss of ur config files, fr fr.

  • -l LOG_LEVEL, --log-level=LOG_LEVEL β€” console logging log level. one of all, garbage, trace, debug, info, warning, error, quiet. Default: warning.
  • --log-file=LOG_FILE β€” log file path. Default: /var/log/salt/ssh.
  • --log-file-level=LOG_LEVEL_LOGFILE β€” logfile logging log level. one of all, garbage, trace, debug, info, warning, error, quiet. Default: warning.

🎯 Target Selection 🎯

The default matching that Salt utilizes is shell-style globbing around the minion id. see https://docs.python.org/3/library/fnmatch.html#module-fnmatch.

  • -E, --pcre β€” the target expression will be interpreted as a PCRE regular expression rather than a shell glob. regex girlies rise πŸ¦‹

🌈 Output Options 🌈

  • --out β€” pass in an alternative outputter to display the return of data. this outputter can be any of the available outputters:
highstate, json, key, overstatestage, pprint, raw, txt, yaml,
and many others.

Some outputters are formatted only for data returned from specific functions. if an outputter is used that does not support the data passed into it, then Salt will fall back on the pprint outputter and display the return data using the Python pprint standard library module. graceful little pivot πŸ’β™€οΈ

  • --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT β€” print the output indented by the provided value in spaces. negative values disable indentation. only applicable in outputters that support indentation. πŸ“
  • --out-file=OUTPUT_FILE, --output-file=OUTPUT_FILE β€” write the output to the specified file. πŸ“„
  • --out-file-append, --output-file-append β€” append the output to the specified file.
  • --no-color β€” disable all colored output. (sad but valid)
  • --force-color β€” force colored output. 🌈✨
NOTE: When using colored output the color codes are as follows: green denotes success, red denotes failure, blue denotes changes and success and yellow denotes a expected future change in configuration.
  • --state-output=STATE_OUTPUT, --state_output=STATE_OUTPUT β€” override the configured state_output value for minion output. one of 'full', 'terse', 'mixed', 'changes' or 'filter'. Default: 'none'.
  • --state-verbose=STATE_VERBOSE, --state_verbose=STATE_VERBOSE β€” override the configured state_verbose value for minion output. set to True or False. Default: none.
NOTE: If using --out=json, you will probably want --static as well. Without the static option, you will get a separate JSON string per minion which makes JSON output invalid as a whole. This is due to using an iterative outputter. So if you want to feed it to a JSON parser, use --static as well. 🚨 bestie this one matters, don't skip it.

🫢 SEE ALSO 🫢

salt(7) salt-master(1) salt-minion(1)


πŸ’œ AUTHOR πŸ’œ

Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file. the whole squad ate, no crumbs 🍽️✨


2025


and that's the whole page, bestie!! go forth and ssh into ur destiny πŸ’…πŸ¦‹

version 3007.8, generated on September 18, 2025 at 06:58:52 UTC β€” slay, that's a wrap πŸŽ€βœ¨

πŸ“¦ where this page comes from