1. knife-ssh(1)
  2. Chef Manual
  3. knife-ssh(1)

NAME

knife-ssh - Run a command or interactive session on multiple remote hosts

SYNOPSIS

knife ssh QUERY COMMAND (options)

-a, --attribute ATTR
The attribute to use for opening the connection - default is fqdn
-C, --concurrency NUM
The number of concurrent connections
-m, --manual-list
QUERY is a space separated list of servers
-P, --ssh-password PASSWORD
The ssh password
-x, --ssh-user USERNAME
The ssh username
-i, --identity-file IDENTITY_FILE
The SSH identity file used for authentication
-p, --ssh-port PORT
The ssh port
--[no-]host-key-verify
Verify host key, enabled by default.

DESCRIPTION

The ssh sub-command opens an ssh session to each of the nodes in the search results of the QUERY. 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).

TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT

knife ssh integrates with several terminal multiplexer programs to provide a more convenient means of managing multiple ssh sessions. When the COMMAND option matches one of these, knife ssh will create multiple interactive ssh sessions running locally in the terminal multiplexer instead of invoking the command on the remote host.

The available multiplexers are:

interactive
A built-in multiplexer. interactive supports running commands on a subset of the connected hosts in parallel
screen(1)
Runs ssh interactively inside screen. ~/.screenrc will be sourced if it exists.
tmux(1)
Runs ssh interactively inside tmux.
macterm (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.

SEE ALSO

knife-search(1)

AUTHOR

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

  1. Chef 11.6.0.hotfix.1
  2. August 2013
  3. knife-ssh(1)