source: trunk/third/openssh/ssh-keyscan.0 @ 16801

Revision 16801, 3.8 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16800, which included commits to RCS files with non-trunk default branches.
Line 
1
2SSH-KEYSCAN(1)              System Reference Manual             SSH-KEYSCAN(1)
3
4NAME
5     ssh-keyscan - gather ssh public keys
6
7SYNOPSIS
8     ssh-keyscan [-v46] [-p port] [-T timeout] [-t type] [-f file] [host |
9                 addrlist namelist] [...]
10
11DESCRIPTION
12     ssh-keyscan is a utility for gathering the public ssh host keys of a numM--
13     ber of hosts.  It was designed to aid in building and verifying
14     ssh_known_hosts files.  ssh-keyscan provides a minimal interface suitable
15     for use by shell and perl scripts.
16
17     ssh-keyscan uses non-blocking socket I/O to contact as many hosts as posM--
18     sible in parallel, so it is very efficient.  The keys from a domain of
19     1,000 hosts can be collected in tens of seconds, even when some of those
20     hosts are down or do not run ssh.  For scanning, one does not need login
21     access to the machines that are being scanned, nor does the scanning proM--
22     cess involve any encryption.
23
24     The options are as follows:
25
26     -p port
27             Port to connect to on the remote host.
28
29     -T timeout
30             Set the timeout for connection attempts.  If timeout seconds have
31             elapsed since a connection was initiated to a host or since the
32             last time anything was read from that host, then the connection
33             is closed and the host in question considered unavailable.  DeM--
34             fault is 5 seconds.
35
36     -t type
37             Specifies the type of the key to fetch from the scanned hosts.
38             The possible values are ``rsa1'' for protocol version 1 and
39             ``rsa'' or ``dsa'' for protocol version 2.  Multiple values may
40             be specified by separating them with commas.  The default is
41             ``rsa1''.
42
43     -f filename
44             Read hosts or addrlist namelist pairs from this file, one per
45             line.  If - is supplied instead of a filename, ssh-keyscan will
46             read hosts or addrlist namelist pairs from the standard input.
47
48     -v      Verbose mode.  Causes ssh-keyscan to print debugging messages
49             about its progress.
50
51     -4      Forces ssh-keyscan to use IPv4 addresses only.
52
53     -6      Forces ssh-keyscan to use IPv6 addresses only.
54
55SECURITY
56     If a ssh_known_hosts file is constructed using ssh-keyscan without veriM--
57     fying the keys, users will be vulnerable to attacks.  On the other hand,
58     if the security model allows such a risk, ssh-keyscan can help in the deM--
59     tection of tampered keyfiles or man in the middle attacks which have beM--
60     gun after the ssh_known_hosts file was created.
61
62EXAMPLES
63     Print the rsa1 host key for machine hostname:
64
65     ssh-keyscan hostname
66
67     Find all hosts from the file ssh_hosts which have new or different keys
68     from those in the sorted file ssh_known_hosts:
69
70     ssh-keyscan -t rsa,dsa -f ssh_hosts | \
71             sort -u - ssh_known_hosts | diff ssh_known_hosts -
72
73FILES
74     Input format:
75
76     1.2.3.4,1.2.4.4 name.my.domain,name,n.my.domain,n,1.2.3.4,1.2.4.4
77
78     Output format for rsa1 keys:
79
80     host-or-namelist bits exponent modulus
81
82     Output format for rsa and dsa keys:
83
84     host-or-namelist keytype base64-encoded-key
85
86     Where keytype is either ``ssh-rsa'' or ``ssh-dsa''.
87
88     /etc/ssh_known_hosts
89
90BUGS
91     It generates "Connection closed by remote host" messages on the consoles
92     of all the machines it scans if the server is older than version 2.9.
93     This is because it opens a connection to the ssh port, reads the public
94     key, and drops the connection as soon as it gets the key.
95
96SEE ALSO
97     ssh(1),  sshd(8)
98
99AUTHORS
100     David Mazieres <dm@lcs.mit.edu> wrote the initial version, and Wayne
101     Davison <wayned@users.sourceforge.net> added support for protocol version
102     2.
103
104BSD Experimental                January 1, 1996                              2
Note: See TracBrowser for help on using the repository browser.