summaryrefslogtreecommitdiff
path: root/distro/common/markdown/man1/knife-ssh.mkd
blob: 7d37075470d0d2d863189e1caf9b37de44d040c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
knife-ssh(1) -- 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://docs.chef.io>