summaryrefslogtreecommitdiff
path: root/distro/common/man/man1/knife-ssh.1
diff options
context:
space:
mode:
authorjamescott <jamescott@opscode.com>2013-10-16 11:36:39 -0700
committerjamescott <jamescott@opscode.com>2013-10-16 11:36:47 -0700
commitd646794e293db9297241c7ab446cc93578479918 (patch)
treee3136708844c79c55a3dada54713ded4118df588 /distro/common/man/man1/knife-ssh.1
parentfdc055c779dda3ee83476d06c8bbefa6c125c234 (diff)
downloadchef-d646794e293db9297241c7ab446cc93578479918.tar.gz
add updated man pages for knife
these are built fully against the chef-docs repo
Diffstat (limited to 'distro/common/man/man1/knife-ssh.1')
-rw-r--r--distro/common/man/man1/knife-ssh.1303
1 files changed, 240 insertions, 63 deletions
diff --git a/distro/common/man/man1/knife-ssh.1 b/distro/common/man/man1/knife-ssh.1
index 3d1a648a47..ea755c9769 100644
--- a/distro/common/man/man1/knife-ssh.1
+++ b/distro/common/man/man1/knife-ssh.1
@@ -1,79 +1,256 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.TH "KNIFE-SSH" "1" "Chef 11.8" "" "knife ssh"
+.SH NAME
+knife-ssh \- The man page for the knife ssh subcommand.
.
-.TH "KNIFE\-SSH" "1" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual"
+.nr rst2man-indent-level 0
.
-.SH "NAME"
-\fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts
-.
-.SH "SYNOPSIS"
-\fBknife\fR \fBssh QUERY COMMAND\fR \fI(options)\fR
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructuredText.
.
+.sp
+The \fBknife ssh\fP subcommand is used to invoke SSH commands (in parallel) on a subset of nodes within an organization, based on the results of a search query.
+.sp
+\fBCommon Options\fP
+.sp
+The following options can be run with all Knife sub\-commands and plug\-ins:
+.INDENT 0.0
.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-The attribute to use for opening the connection \- default is fqdn
-.
+.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP
+The configuration file to use.
.TP
-\fB\-C\fR, \fB\-\-concurrency NUM\fR
-The number of concurrent connections
-.
+.B \fB\-\-color\fP
+Indicates that colored output will be used.
.TP
-\fB\-m\fR, \fB\-\-manual\-list\fR
-QUERY is a space separated list of servers
-.
+.B \fB\-d\fP, \fB\-\-disable\-editing\fP
+Indicates that $EDITOR will not be opened; data will be accepted as\-is.
.TP
-\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
-The ssh password
-.
+.B \fB\-\-defaults\fP
+Indicates that Knife will use the default value, instead of asking a user to provide one.
.TP
-\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
-The ssh username
-.
+.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP
+The $EDITOR that is used for all interactive commands.
.TP
-\fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR
-The SSH identity file used for authentication
-.
+.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP
+The name of the environment. When this option is added to a command, the command will run only against the named environment.
.TP
-\fB\-p\fR, \fB\-\-ssh\-port PORT\fR
-The ssh port
-.
+.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP
+Indicates that the private key will be saved to a specified file name.
.TP
-\fB\-\-[no\-]host\-key\-verify\fR
-Verify host key, enabled by default\.
-.
-.SH "DESCRIPTION"
-The \fIssh\fR sub\-command opens an ssh session to each of the nodes in the search results of the \fIQUERY\fR\. This sub\-command requires that the net\-ssh\-multi and highline Ruby libraries are installed\. On Debian systems, these are the libnet\-ssh\-multi\-ruby and libhighline\-ruby packages\. They can also be installed as RubyGems (net\-ssh\-multi and highline, respectively)\.
-.
-.SH "TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT"
-\fBknife ssh\fR integrates with several terminal multiplexer programs to provide a more convenient means of managing multiple ssh sessions\. When the \fICOMMAND\fR option matches one of these, \fBknife ssh\fR will create multiple interactive ssh sessions running locally in the terminal multiplexer instead of invoking the command on the remote host\.
-.
-.P
-The available multiplexers are:
-.
+.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
+The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP.
.TP
-\fBinteractive\fR
-A built\-in multiplexer\. \fBinteractive\fR supports running commands on a subset of the connected hosts in parallel
-.
+.B \fB\-h\fP, \fB\-\-help\fP
+Shows help for the command.
.TP
-\fBscreen\fR(1)
-Runs ssh interactively inside \fBscreen\fR\. ~/\.screenrc will be sourced if it exists\.
-.
+.B \fB\-k KEY\fP, \fB\-\-key KEY\fP
+The private key that Knife will use to sign requests made by the API client to the server.
.TP
-\fBtmux\fR(1)
-Runs ssh interactively inside tmux\.
-.
+.B \fB\-\-no\-color\fP
+Indicates that color will not be used in the output.
.TP
-\fBmacterm\fR (Mac OS X only)
-Opens a Terminal\.app window and creates a tab for each ssh session\. You must install the rb\-appscript gem before you can use this option\.
-.
-.SH "SEE ALSO"
-\fBknife\-search\fR(1)
-.
-.SH "AUTHOR"
-Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
-.
-.SH "DOCUMENTATION"
-This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP
+The user password.
+.TP
+.B \fB\-\-print\-after\fP
+Indicates that data will be shown after a destructive operation.
+.TP
+.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
+The URL for the server.
+.TP
+.B \fB\-u USER\fP, \fB\-\-user USER\fP
+The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key.
+.TP
+.B \fB\-v\fP, \fB\-\-version\fP
+The version of the chef\-client.
+.TP
+.B \fB\-V\fP, \fB\-\-verbose\fP
+Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
+.TP
+.B \fB\-y\fP, \fB\-\-yes\fP
+Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).
+.UNINDENT
+.sp
+\fBSyntax\fP
+.sp
+This argument has the following syntax:
+.sp
+.nf
+.ft C
+$ knife ssh SEARCH_QUERY SSH_COMMAND (options)
+.ft P
+.fi
+.sp
+\fBOptions\fP
+.sp
+This subcommand has the following options:
+.INDENT 0.0
+.TP
+.B \fB\-a SSH_ATTR\fP, \fB\-\-attribute SSH_ATTR\fP
+The attribute that is used when opening the SSH connection. The default attribute is the FQDN of the host. Other possible values include a public IP address, a private IP address, or a hostname.
+.TP
+.B \fB\-C NUM\fP, \fB\-\-concurrency NUM\fP
+The number of allowed concurrent connections.
+.TP
+.B \fB\-G GATEWAY\fP, \fB\-\-ssh\-gateway GATEWAY\fP
+The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation.
+.TP
+.B \fB\-i IDENTITY_FILE\fP, \fB\-\-identity\-file IDENTIFY_FILE\fP
+The SSH identity file used for authentication. Key\-based authentication is recommended.
+.TP
+.B \fB\-m\fP, \fB\-\-manual\-list\fP
+Indicates that a search query is a space\-separated list of servers. If there is more than one item in the list, put quotes around the entire list. For example: \fB\-\-manual\-list "server01 server 02 server 03"\fP
+.TP
+.B \fB\-\-[no\-]host\-key\-verify\fP
+Use \fB\-\-no\-host\-key\-verify\fP to disable host key verification. Default setting: \fB\-\-host\-key\-verify\fP.
+.TP
+.B \fBOTHER\fP
+The shell type. Possible values: \fBinteractive\fP, \fBscreen\fP, \fBtmux\fP, \fBmacterm\fP, or \fBcssh\fP. (\fBcsshx\fP is deprecated in favor of \fBcssh\fP.)
+.TP
+.B \fB\-p PORT\fP, \fB\-\-ssh\-port PORT\fP
+The SSH port.
+.TP
+.B \fB\-P PASSWORD\fP, \fB\-\-ssh\-password PASSWORD\fP
+The SSH password. This can be used to pass the password directly on the command line. If this option is not specified (and a password is required) Knife will prompt for the password.
+.TP
+.B \fBSEARCH_QUERY\fP
+The search query used to return a list of servers to be accessed using SSH and the specified \fBSSH_COMMAND\fP. This option uses the same syntax as the search sub\-command.
+.TP
+.B \fBSSH_COMMAND\fP
+The command that will be run against the results of a search query.
+.TP
+.B \fB\-x USER_NAME\fP, \fB\-\-ssh\-user USER_NAME\fP
+The SSH user name.
+.UNINDENT
+.sp
+\fBExamples\fP
+.sp
+To find the uptime of all of web servers running Ubuntu on the Amazon EC2 platform, enter:
+.sp
+.nf
+.ft C
+$ knife ssh "role:web" "uptime" \-x ubuntu \-a ec2.public_hostname
+.ft P
+.fi
+.sp
+to return something like:
+.sp
+.nf
+.ft C
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com 13:50:47 up 1 day, 23:26, 1 user, load average: 0.25, 0.18, 0.11
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com 13:50:47 up 1 day, 23:33, 1 user, load average: 0.12, 0.13, 0.10
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com 13:50:48 up 16:45, 1 user, load average: 0.30, 0.22, 0.13
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com 13:50:48 up 1 day, 22:59, 1 user, load average: 0.24, 0.17, 0.11
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com 13:50:48 up 1 day, 23:30, 1 user, load average: 0.32, 0.17, 0.15
+.ft P
+.fi
+.sp
+To run the chef\-client on all nodes, enter:
+.sp
+.nf
+.ft C
+$ knife ssh \(aqname:*\(aq \(aqsudo chef\-client\(aq
+.ft P
+.fi
+.sp
+To force a chef\-client run on all of the web servers running Ubuntu on the Amazon EC2 platform, enter:
+.sp
+.nf
+.ft C
+$ knife ssh "role:web" "sudo chef\-client" \-x ubuntu \-a ec2.public_hostname
+.ft P
+.fi
+.sp
+to return something like:
+.sp
+.nf
+.ft C
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:37 +0000] INFO: Starting Chef Run (Version 0.9.10)
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:37 +0000] INFO: Starting Chef Run (Version 0.9.10)
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10)
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10)
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10)
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Chef Run complete in 1.419243 seconds
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: cleaning the checksum cache
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Running report handlers
+ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Report handlers complete
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Chef Run complete in 1.578265 seconds
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: cleaning the checksum cache
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Running report handlers
+ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Report handlers complete
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.638884 seconds
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers
+ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.540257 seconds
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers
+ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.502489 seconds
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers
+ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete
+.ft P
+.fi
+.sp
+To query for all nodes that have the "webserver" role and then use SSH to run the command "sudo chef\-client", enter:
+.sp
+.nf
+.ft C
+$ knife ssh "role:webserver" "sudo chef\-client"
+.ft P
+.fi
+.sp
+To upgrade all nodes, enter:
+.sp
+.nf
+.ft C
+$ knife ssh name:* "sudo aptitude upgrade \-y"
+.ft P
+.fi
+.sp
+To specify the shell type used on the nodes returned by a search query:
+.sp
+.nf
+.ft C
+$ knife ssh roles:opscode\-omnitruck macterm
+.ft P
+.fi
+.sp
+where \fBscreen\fP is one of the following values: \fBcssh\fP, \fBinteractive\fP, \fBmacterm\fP, \fBscreen\fP, or \fBtmux\fP. If the node does not have the shell type installed, Knife will return an error similar to the following:
+.sp
+.nf
+.ft C
+you need the rb\-appscript gem to use knife ssh macterm.
+\(ga(sudo) gem install rb\-appscript\(ga to install
+ERROR: LoadError: cannot load such file \-\- appscript
+.ft P
+.fi
+.SH AUTHOR
+Opscode
+.SH COPYRIGHT
+This work is licensed under a Creative Commons Attribution 3.0 Unported License
+.\" Generated by docutils manpage writer.
.
-.SH "CHEF"
-Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR