salt-ssh.1 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SALT-SSH" "1" "Nov 14, 2020" "3002.2" "Salt"
  4. .SH NAME
  5. salt-ssh \- salt-ssh Documentation
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .INDENT 0.0
  35. .INDENT 3.5
  36. .sp
  37. .nf
  38. .ft C
  39. salt\-ssh \(aq*\(aq [ options ] sys.doc
  40. salt\-ssh \-E \(aq.*\(aq [ options ] sys.doc cmd
  41. .ft P
  42. .fi
  43. .UNINDENT
  44. .UNINDENT
  45. .SH DESCRIPTION
  46. .sp
  47. Salt SSH allows for salt routines to be executed using only SSH for transport
  48. .SH OPTIONS
  49. .INDENT 0.0
  50. .TP
  51. .B \-\-version
  52. Print the version of Salt that is running.
  53. .UNINDENT
  54. .INDENT 0.0
  55. .TP
  56. .B \-\-versions\-report
  57. Show program\(aqs dependencies and version number, and then exit
  58. .UNINDENT
  59. .INDENT 0.0
  60. .TP
  61. .B \-h, \-\-help
  62. Show the help message and exit
  63. .UNINDENT
  64. .INDENT 0.0
  65. .TP
  66. .B \-c CONFIG_DIR, \-\-config\-dir=CONFIG_dir
  67. The location of the Salt configuration directory. This directory contains
  68. the configuration files for Salt master and minions. The default location
  69. on most systems is \fB/etc/salt\fP\&.
  70. .UNINDENT
  71. .INDENT 0.0
  72. .TP
  73. .B \-\-hard\-crash
  74. Raise any original exception rather than exiting gracefully. Default: False.
  75. .UNINDENT
  76. .INDENT 0.0
  77. .TP
  78. .B \-r, \-\-raw, \-\-raw\-shell
  79. Execute a raw shell command.
  80. .UNINDENT
  81. .INDENT 0.0
  82. .TP
  83. .B \-\-roster
  84. Define which roster system to use, this defines if a database backend,
  85. scanner, or custom roster system is used. Default is the flat file roster.
  86. .UNINDENT
  87. .INDENT 0.0
  88. .TP
  89. .B \-\-roster\-file
  90. Define an alternative location for the default roster file location. The
  91. default roster file is called \fBroster\fP and is found in the same directory
  92. as the master config file.
  93. .sp
  94. New in version 2014.1.0.
  95. .UNINDENT
  96. .INDENT 0.0
  97. .TP
  98. .B \-\-refresh, \-\-refresh\-cache
  99. Force a refresh of the master side data cache of the target\(aqs data. This
  100. is needed if a target\(aqs grains have been changed and the auto refresh
  101. timeframe has not been reached.
  102. .UNINDENT
  103. .INDENT 0.0
  104. .TP
  105. .B \-\-max\-procs
  106. Set the number of concurrent minions to communicate with. This value
  107. defines how many processes are opened up at a time to manage connections,
  108. the more running process the faster communication should be, default
  109. is 25.
  110. .UNINDENT
  111. .INDENT 0.0
  112. .TP
  113. .B \-\-extra\-filerefs=EXTRA_FILEREFS
  114. Pass in extra files to include in the state tarball.
  115. .UNINDENT
  116. .INDENT 0.0
  117. .TP
  118. .B \-\-min\-extra\-modules=MIN_EXTRA_MODS
  119. One or comma\-separated list of extra Python modulesto be included
  120. into Minimal Salt.
  121. .UNINDENT
  122. .INDENT 0.0
  123. .TP
  124. .B \-\-thin\-extra\-modules=THIN_EXTRA_MODS
  125. One or comma\-separated list of extra Python modulesto be included
  126. into Thin Salt.
  127. .UNINDENT
  128. .INDENT 0.0
  129. .TP
  130. .B \-v, \-\-verbose
  131. Turn on command verbosity, display jid.
  132. .UNINDENT
  133. .INDENT 0.0
  134. .TP
  135. .B \-s, \-\-static
  136. Return the data from minions as a group after they all return.
  137. .UNINDENT
  138. .INDENT 0.0
  139. .TP
  140. .B \-w, \-\-wipe
  141. Remove the deployment of the salt files when done executing.
  142. .UNINDENT
  143. .INDENT 0.0
  144. .TP
  145. .B \-W, \-\-rand\-thin\-dir
  146. Select a random temp dir to deploy on the remote system. The dir
  147. will be cleaned after the execution.
  148. .UNINDENT
  149. .INDENT 0.0
  150. .TP
  151. .B \-t, \-\-regen\-thin, \-\-thin
  152. Trigger a thin tarball regeneration. This is needed if custom
  153. grains/modules/states have been added or updated.
  154. .UNINDENT
  155. .INDENT 0.0
  156. .TP
  157. .B \-\-python2\-bin=PYTHON2_BIN
  158. Path to a python2 binary which has salt installed.
  159. .UNINDENT
  160. .INDENT 0.0
  161. .TP
  162. .B \-\-python3\-bin=PYTHON3_BIN
  163. Path to a python3 binary which has salt installed.
  164. .UNINDENT
  165. .INDENT 0.0
  166. .TP
  167. .B \-\-jid=JID
  168. Pass a JID to be used instead of generating one.
  169. .UNINDENT
  170. .INDENT 0.0
  171. .TP
  172. .B \-\-pre\-flight
  173. Run the ssh_pre_flight script defined in the roster.
  174. By default this script will only run if the thin dir
  175. does not exist on the target minion. This option will
  176. force the script to run regardless of the thin dir
  177. existing or not.
  178. .UNINDENT
  179. .SS Authentication Options
  180. .INDENT 0.0
  181. .TP
  182. .B \-\-priv=SSH_PRIV
  183. Specify the SSH private key file to be used for authentication.
  184. .UNINDENT
  185. .INDENT 0.0
  186. .TP
  187. .B \-\-priv\-passwd=SSH_PRIV_PASSWD
  188. Specify the SSH private key file\(aqs passphrase if need be.
  189. .UNINDENT
  190. .INDENT 0.0
  191. .TP
  192. .B \-i, \-\-ignore\-host\-keys
  193. By default ssh host keys are honored and connections will ask for
  194. approval. Use this option to disable StrictHostKeyChecking.
  195. .UNINDENT
  196. .INDENT 0.0
  197. .TP
  198. .B \-\-no\-host\-keys
  199. Fully ignores ssh host keys which by default are honored and connections
  200. would ask for approval. Useful if the host key of a remote server has
  201. changed and would still error with \-\-ignore\-host\-keys.
  202. .UNINDENT
  203. .INDENT 0.0
  204. .TP
  205. .B \-\-user=SSH_USER
  206. Set the default user to attempt to use when authenticating.
  207. .UNINDENT
  208. .INDENT 0.0
  209. .TP
  210. .B \-\-passwd
  211. Set the default password to attempt to use when authenticating.
  212. .UNINDENT
  213. .INDENT 0.0
  214. .TP
  215. .B \-\-askpass
  216. Interactively ask for the SSH password with no echo \- avoids password
  217. in process args and stored in history.
  218. .UNINDENT
  219. .INDENT 0.0
  220. .TP
  221. .B \-\-key\-deploy
  222. Set this flag to attempt to deploy the authorized ssh key with all
  223. minions. This combined with \-\-passwd can make initial deployment of keys
  224. very fast and easy.
  225. .UNINDENT
  226. .INDENT 0.0
  227. .TP
  228. .B \-\-identities\-only
  229. Use the only authentication identity files configured in the ssh_config
  230. files. See IdentitiesOnly flag in man ssh_config.
  231. .UNINDENT
  232. .INDENT 0.0
  233. .TP
  234. .B \-\-sudo
  235. Run command via sudo.
  236. .UNINDENT
  237. .SS Scan Roster Options
  238. .INDENT 0.0
  239. .TP
  240. .B \-\-scan\-ports=SSH_SCAN_PORTS
  241. Comma\-separated list of ports to scan in the scan roster.
  242. .UNINDENT
  243. .INDENT 0.0
  244. .TP
  245. .B \-\-scan\-timeout=SSH_SCAN_TIMEOUT
  246. Scanning socket timeout for the scan roster.
  247. .UNINDENT
  248. .SS Logging Options
  249. .sp
  250. Logging options which override any settings defined on the configuration files.
  251. .INDENT 0.0
  252. .TP
  253. .B \-l LOG_LEVEL, \-\-log\-level=LOG_LEVEL
  254. Console logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
  255. \fBdebug\fP, \fBinfo\fP, \fBwarning\fP, \fBerror\fP, \fBquiet\fP\&. Default:
  256. \fBwarning\fP\&.
  257. .UNINDENT
  258. .INDENT 0.0
  259. .TP
  260. .B \-\-log\-file=LOG_FILE
  261. Log file path. Default: /var/log/salt/ssh\&.
  262. .UNINDENT
  263. .INDENT 0.0
  264. .TP
  265. .B \-\-log\-file\-level=LOG_LEVEL_LOGFILE
  266. Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
  267. \fBdebug\fP, \fBinfo\fP, \fBwarning\fP, \fBerror\fP, \fBquiet\fP\&. Default:
  268. \fBwarning\fP\&.
  269. .UNINDENT
  270. .SS Target Selection
  271. .sp
  272. The default matching that Salt utilizes is shell\-style globbing around the
  273. minion id. See \fI\%https://docs.python.org/2/library/fnmatch.html#module\-fnmatch\fP\&.
  274. .INDENT 0.0
  275. .TP
  276. .B \-E, \-\-pcre
  277. The target expression will be interpreted as a PCRE regular expression
  278. rather than a shell glob.
  279. .UNINDENT
  280. .SS Output Options
  281. .INDENT 0.0
  282. .TP
  283. .B \-\-out
  284. Pass in an alternative outputter to display the return of data. This
  285. outputter can be any of the available outputters:
  286. .INDENT 7.0
  287. .INDENT 3.5
  288. \fBhighstate\fP, \fBjson\fP, \fBkey\fP, \fBoverstatestage\fP, \fBpprint\fP, \fBraw\fP, \fBtxt\fP, \fByaml\fP, and many others\&.
  289. .UNINDENT
  290. .UNINDENT
  291. .sp
  292. Some outputters are formatted only for data returned from specific functions.
  293. If an outputter is used that does not support the data passed into it, then
  294. Salt will fall back on the \fBpprint\fP outputter and display the return data
  295. using the Python \fBpprint\fP standard library module.
  296. .UNINDENT
  297. .INDENT 0.0
  298. .TP
  299. .B \-\-out\-indent OUTPUT_INDENT, \-\-output\-indent OUTPUT_INDENT
  300. Print the output indented by the provided value in spaces. Negative values
  301. disable indentation. Only applicable in outputters that support
  302. indentation.
  303. .UNINDENT
  304. .INDENT 0.0
  305. .TP
  306. .B \-\-out\-file=OUTPUT_FILE, \-\-output\-file=OUTPUT_FILE
  307. Write the output to the specified file.
  308. .UNINDENT
  309. .INDENT 0.0
  310. .TP
  311. .B \-\-out\-file\-append, \-\-output\-file\-append
  312. Append the output to the specified file.
  313. .UNINDENT
  314. .INDENT 0.0
  315. .TP
  316. .B \-\-no\-color
  317. Disable all colored output
  318. .UNINDENT
  319. .INDENT 0.0
  320. .TP
  321. .B \-\-force\-color
  322. Force colored output
  323. .sp
  324. \fBNOTE:\fP
  325. .INDENT 7.0
  326. .INDENT 3.5
  327. When using colored output the color codes are as follows:
  328. .sp
  329. \fBgreen\fP denotes success, \fBred\fP denotes failure, \fBblue\fP denotes
  330. changes and success and \fByellow\fP denotes a expected future change in configuration.
  331. .UNINDENT
  332. .UNINDENT
  333. .UNINDENT
  334. .INDENT 0.0
  335. .TP
  336. .B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
  337. Override the configured state_output value for minion
  338. output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
  339. \(aqfilter\(aq. Default: \(aqnone\(aq.
  340. .UNINDENT
  341. .INDENT 0.0
  342. .TP
  343. .B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
  344. Override the configured state_verbose value for minion
  345. output. Set to True or False. Default: none.
  346. .UNINDENT
  347. .sp
  348. \fBNOTE:\fP
  349. .INDENT 0.0
  350. .INDENT 3.5
  351. If using \fB\-\-out=json\fP, you will probably want \fB\-\-static\fP as well.
  352. Without the static option, you will get a separate JSON string per minion
  353. which makes JSON output invalid as a whole.
  354. This is due to using an iterative outputter. So if you want to feed it
  355. to a JSON parser, use \fB\-\-static\fP as well.
  356. .UNINDENT
  357. .UNINDENT
  358. .SH SEE ALSO
  359. .sp
  360. \fBsalt(7)\fP
  361. \fBsalt\-master(1)\fP
  362. \fBsalt\-minion(1)\fP
  363. .SH AUTHOR
  364. Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
  365. .\" Generated by docutils manpage writer.
  366. .