# PaCkAgE DaTaStReAm
openssh 1 10525
# end of header
0707010002a7ef000081a400000000000000000000000150ff747d000001090000010000010031ffffffffffffffff0000001000000000openssh/pkginfo PKG=openssh
NAME=openssh 6.1p1 SPARC 64bit Solaris 10
VERSION=6.1p1
PSTAMP=15th January 2013
VENDOR=OpenSSH Project
EMAIL=http://openssh.org/
DESC=OpenSSH encrypted remote shell
ARCH=sparc
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
0707010002a7ee000081a400000000000000000000000150ff747d00000c5e0000010000010031ffffffffffffffff0000000f00000000openssh/pkgmap : 1 10525
1 d none /usr ? ? ?
1 d none /usr/local ? ? ?
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/scp 0755 root root 134080 58753 1358918694
1 f none /usr/local/bin/sftp 0755 root root 220096 25687 1358918695
1 s none /usr/local/bin/slogin=./ssh
1 f none /usr/local/bin/ssh 0755 root root 887784 41734 1358918694
1 f none /usr/local/bin/ssh-add 0755 root root 339144 16672 1358918694
1 f none /usr/local/bin/ssh-agent 0755 root root 295776 47812 1358918694
1 f none /usr/local/bin/ssh-keygen 0755 root root 438392 37005 1358918694
1 f none /usr/local/bin/ssh-keyscan 0755 root root 534168 6532 1358918694
1 d none /usr/local/etc 0755 root root
1 f none /usr/local/etc/moduli 0644 root root 125811 34787 1306816987
1 f none /usr/local/etc/ssh_config 0644 root root 1555 432 1306816987
1 f none /usr/local/etc/sshd_config 0644 root root 3292 34255 1306816987
1 d none /usr/local/lib 0755 root root
1 d none /usr/local/lib/smf 0755 root root
1 f none /usr/local/lib/smf/openssh.service.manifest 0644 root root 3543 21528 1358918781
1 f none /usr/local/lib/smf/openssh.service.method 0755 root root 596 41183 1358918781
1 d none /usr/local/libexec 0755 root root
1 f none /usr/local/libexec/sftp-server 0755 root root 142504 23490 1358918695
1 f none /usr/local/libexec/ssh-keysign 4711 root root 538432 8857 1358918694
1 f none /usr/local/libexec/ssh-pkcs11-helper 0755 root root 257448 48197 1358918694
1 d none /usr/local/sbin 0755 root root
1 f none /usr/local/sbin/sshd 0755 root root 1164584 57333 1358918694
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/scp.1 0644 root root 4830 32433 1358918695
1 f none /usr/local/share/man/man1/sftp.1 0644 root root 12099 30775 1358918695
1 s none /usr/local/share/man/man1/slogin.1=./ssh.1
1 f none /usr/local/share/man/man1/ssh-add.1 0644 root root 4472 1276 1358918695
1 f none /usr/local/share/man/man1/ssh-agent.1 0644 root root 5209 2834 1358918695
1 f none /usr/local/share/man/man1/ssh-keygen.1 0644 root root 20630 1689 1358918695
1 f none /usr/local/share/man/man1/ssh-keyscan.1 0644 root root 4029 29574 1358918695
1 f none /usr/local/share/man/man1/ssh.1 0644 root root 40611 35902 1358918695
1 d none /usr/local/share/man/man5 0755 root root
1 f none /usr/local/share/man/man5/moduli.5 0644 root root 2659 38896 1358918695
1 f none /usr/local/share/man/man5/ssh_config.5 0644 root root 34663 40538 1358918695
1 f none /usr/local/share/man/man5/sshd_config.5 0644 root root 33008 32154 1358918695
1 d none /usr/local/share/man/man8 0755 root root
1 f none /usr/local/share/man/man8/sftp-server.8 0644 root root 2342 5877 1358918695
1 f none /usr/local/share/man/man8/ssh-keysign.8 0644 root root 1671 16846 1358918695
1 f none /usr/local/share/man/man8/ssh-pkcs11-helper.8 0644 root root 560 45473 1358918695
1 f none /usr/local/share/man/man8/sshd.8 0644 root root 29882 6099 1358918695
1 i checkinstall 785 2565 1358918780
1 i pkginfo 265 20685 1358918781
1 i postinstall 3347 17080 1358918781
1 i preinstall 659 54575 1358918780
1 i preremove 776 65190 1358918781
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!! 0707010002a7ef000081a400000000000000000000000150ff747d000001090000010000010031ffffffffffffffff0000000800000000pkginfo PKG=openssh
NAME=openssh 6.1p1 SPARC 64bit Solaris 10
VERSION=6.1p1
PSTAMP=15th January 2013
VENDOR=OpenSSH Project
EMAIL=http://openssh.org/
DESC=OpenSSH encrypted remote shell
ARCH=sparc
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
0707010002a7ee000081a400000000000000000000000150ff747d00000c5e0000010000010031ffffffffffffffff0000000700000000pkgmap : 1 10525
1 d none /usr ? ? ?
1 d none /usr/local ? ? ?
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/scp 0755 root root 134080 58753 1358918694
1 f none /usr/local/bin/sftp 0755 root root 220096 25687 1358918695
1 s none /usr/local/bin/slogin=./ssh
1 f none /usr/local/bin/ssh 0755 root root 887784 41734 1358918694
1 f none /usr/local/bin/ssh-add 0755 root root 339144 16672 1358918694
1 f none /usr/local/bin/ssh-agent 0755 root root 295776 47812 1358918694
1 f none /usr/local/bin/ssh-keygen 0755 root root 438392 37005 1358918694
1 f none /usr/local/bin/ssh-keyscan 0755 root root 534168 6532 1358918694
1 d none /usr/local/etc 0755 root root
1 f none /usr/local/etc/moduli 0644 root root 125811 34787 1306816987
1 f none /usr/local/etc/ssh_config 0644 root root 1555 432 1306816987
1 f none /usr/local/etc/sshd_config 0644 root root 3292 34255 1306816987
1 d none /usr/local/lib 0755 root root
1 d none /usr/local/lib/smf 0755 root root
1 f none /usr/local/lib/smf/openssh.service.manifest 0644 root root 3543 21528 1358918781
1 f none /usr/local/lib/smf/openssh.service.method 0755 root root 596 41183 1358918781
1 d none /usr/local/libexec 0755 root root
1 f none /usr/local/libexec/sftp-server 0755 root root 142504 23490 1358918695
1 f none /usr/local/libexec/ssh-keysign 4711 root root 538432 8857 1358918694
1 f none /usr/local/libexec/ssh-pkcs11-helper 0755 root root 257448 48197 1358918694
1 d none /usr/local/sbin 0755 root root
1 f none /usr/local/sbin/sshd 0755 root root 1164584 57333 1358918694
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/scp.1 0644 root root 4830 32433 1358918695
1 f none /usr/local/share/man/man1/sftp.1 0644 root root 12099 30775 1358918695
1 s none /usr/local/share/man/man1/slogin.1=./ssh.1
1 f none /usr/local/share/man/man1/ssh-add.1 0644 root root 4472 1276 1358918695
1 f none /usr/local/share/man/man1/ssh-agent.1 0644 root root 5209 2834 1358918695
1 f none /usr/local/share/man/man1/ssh-keygen.1 0644 root root 20630 1689 1358918695
1 f none /usr/local/share/man/man1/ssh-keyscan.1 0644 root root 4029 29574 1358918695
1 f none /usr/local/share/man/man1/ssh.1 0644 root root 40611 35902 1358918695
1 d none /usr/local/share/man/man5 0755 root root
1 f none /usr/local/share/man/man5/moduli.5 0644 root root 2659 38896 1358918695
1 f none /usr/local/share/man/man5/ssh_config.5 0644 root root 34663 40538 1358918695
1 f none /usr/local/share/man/man5/sshd_config.5 0644 root root 33008 32154 1358918695
1 d none /usr/local/share/man/man8 0755 root root
1 f none /usr/local/share/man/man8/sftp-server.8 0644 root root 2342 5877 1358918695
1 f none /usr/local/share/man/man8/ssh-keysign.8 0644 root root 1671 16846 1358918695
1 f none /usr/local/share/man/man8/ssh-pkcs11-helper.8 0644 root root 560 45473 1358918695
1 f none /usr/local/share/man/man8/sshd.8 0644 root root 29882 6099 1358918695
1 i checkinstall 785 2565 1358918780
1 i pkginfo 265 20685 1358918781
1 i postinstall 3347 17080 1358918781
1 i preinstall 659 54575 1358918780
1 i preremove 776 65190 1358918781
0707010002a81d000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000000800000000install 0707010002a821000081ed00000000000000000000000150ff747d000003080000010000010031ffffffffffffffff0000001200000000install/preremove #!/usr/bin/ksh
#
# Turn off OpenSSH and switch on Solaris SSH
#
ssh_enabled=`/bin/svcs -l svc:/network/ssh:default | /bin/grep enabled | /bin/tr -s ' ' ' ' | /bin/cut -f2 -d ' '`
openssh_enabled=`/bin/svcs -l svc:/network/openssh:default | /bin/grep enabled | /bin/tr -s ' ' ' ' | /bin/cut -f2 -d ' '`
if [ "X${openssh_enabled}" = "Xtrue" ]; then
echo "Disabling OpenSSH"
/usr/sbin/svcadm disable svc:/network/openssh:default
sleep 3
fi
if [ "X${ssh_enabled}" != "Xtrue" ]; then
echo "Enabling Solaris SSH"
/usr/sbin/svcadm enable svc:/network/ssh:default
fi
#
# Remove OpenSSH 6.1p1 from SMF
#
exists_openssh=`/usr/sbin/svccfg list network/openssh`
if [ "X${exists_openssh}" = "Xnetwork/openssh" ]; then
/usr/sbin/svccfg delete -f network/openssh
fi
0707010002a81f000081ed00000000000000000000000150ff747d00000d130000010000010031ffffffffffffffff0000001400000000install/postinstall #!/usr/bin/ksh
#
# Add rsa1 host key
#
if [ ! -f "/usr/local/etc/ssh_host_key" ]; then
if [ -f "/etc/ssh/ssh_host_key" ]; then
echo "Re-using host key /etc/ssh/ssh_host_key"
cp /etc/ssh/ssh_host_key /usr/local/etc/ssh_host_key
chown root:root /usr/local/etc/ssh_host_key
chmod 600 /usr/local/etc/ssh_host_key
else
/usr/local/bin/ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N ""
fi
fi
#
# Add rsa host key
#
if [ ! -f "/usr/local/etc/ssh_host_rsa_key" ]; then
if [ -f "/etc/ssh/ssh_host_rsa_key" ]; then
echo "Re-using host key /etc/ssh/ssh_host_rsa_key"
cp /etc/ssh/ssh_host_rsa_key /usr/local/etc/ssh_host_rsa_key
cp /etc/ssh/ssh_host_rsa_key.pub /usr/local/etc/ssh_host_rsa_key.pub
chown root:root /usr/local/etc/ssh_host_rsa_key
chown root:root /usr/local/etc/ssh_host_rsa_key.pub
chmod 600 /usr/local/etc/ssh_host_rsa_key
chmod 644 /usr/local/etc/ssh_host_rsa_key.pub
else
/usr/local/bin/ssh-keygen -t rsa -b 2048 -f /usr/local/etc/ssh_host_rsa_key -N ""
fi
fi
#
# Add dsa host key
#
if [ ! -f "/usr/local/etc/ssh_host_dsa_key" ]; then
if [ -f "/etc/ssh/ssh_host_dsa_key" ]; then
echo "Re-using host key /etc/ssh/ssh_host_dsa_key"
cp /etc/ssh/ssh_host_dsa_key /usr/local/etc/ssh_host_dsa_key
cp /etc/ssh/ssh_host_dsa_key.pub /usr/local/etc/ssh_host_dsa_key.pub
chown root:root /usr/local/etc/ssh_host_dsa_key
chown root:root /usr/local/etc/ssh_host_dsa_key.pub
chmod 600 /usr/local/etc/ssh_host_dsa_key
chmod 644 /usr/local/etc/ssh_host_dsa_key.pub
else
/usr/local/bin/ssh-keygen -t dsa -b 2048 -f /usr/local/etc/ssh_host_dsa_key -N ""
fi
fi
#
# Add ecdsa host key
#
if [ ! -f "/usr/local/etc/ssh_host_ecdsa_key" ]; then
if [ -f "/etc/ssh/ssh_host_ecdsa_key" ]; then
echo "Re-using host key /etc/ssh/ssh_host_ecdsa_key"
cp /etc/ssh/ssh_host_ecdsa_key /usr/local/etc/ssh_host_ecdsa_key
cp /etc/ssh/ssh_host_ecdsa_key.pub /usr/local/etc/ssh_host_ecdsa_key.pub
chown root:root /usr/local/etc/ssh_host_ecdsa_key
chown root:root /usr/local/etc/ssh_host_ecdsa_key.pub
chmod 600 /usr/local/etc/ssh_host_ecdsa_key
chmod 644 /usr/local/etc/ssh_host_ecdsa_key.pub
else
/usr/local/bin/ssh-keygen -t ecdsa -b 521 -f /usr/local/etc/ssh_host_ecdsa_key -N ""
fi
fi
#
# Add OpenSSH 6.1p1 to SMF
#
if [ -f "/usr/local/lib/smf/openssh.service.manifest" ]; then
echo "Adding /usr/local/lib/smf/openssh.service.manifest to SMF..."
/usr/sbin/svccfg import /usr/local/lib/smf/openssh.service.manifest
fi
#
# Turn of Solaris SSH and switch on this OpenSSH
#
ssh_enabled=`/bin/svcs -l svc:/network/ssh:default | /bin/grep enabled | /bin/tr -s ' ' ' ' | /bin/cut -f2 -d ' '`
openssh_enabled=`/bin/svcs -l svc:/network/openssh:default | /bin/grep enabled | /bin/tr -s ' ' ' ' | /bin/cut -f2 -d ' '`
if [ "X${ssh_enabled}" = "Xtrue" ]; then
echo "Disabling Solaris SSH"
/usr/sbin/svcadm disable svc:/network/ssh:default
sleep 3
fi
if [ "X${openssh_enabled}" != "Xtrue" ]; then
echo "Enabling OpenSSH"
/usr/sbin/svcadm enable svc:/network/openssh:default
else
echo "Restarting OpenSSH"
/usr/sbin/svcadm refresh svc:/network/openssh:default
fi
0707010002a81e000081ed00000000000000000000000150ff747c000003110000010000010031ffffffffffffffff0000001500000000install/checkinstall #!/bin/sh
#
expected_bits="64"
expected_release="5.10"
expected_platform="sparc"
#
release=`uname -r`
platform=`uname -p`
bits=`isainfo -b`
#
if [ ${platform} != ${expected_platform} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${release} != ${expected_release} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${bits} != ${expected_bits} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n"
echo "\tYour machine is running a ${bits} bit O.S. currently\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
exit 0
0707010002a820000081ed00000000000000000000000150ff747c000002930000010000010031ffffffffffffffff0000001300000000install/preinstall #!/usr/bin/ksh
sshd_dir="/var/empty"
sshd_user="sshd"
sshd_user_uid="27"
sshd_group="sshd"
sshd_group_gid="27"
#
# Add /var/empty
#
if [ ! -d "${sshd_dir}" ]; then
mkdir -p ${sshd_dir}
fi
#
# Add /var/run
#
if [ ! -d "/var/run" ]; then
mkdir -p /var/run
fi
#
# Add sshd group
#
group=`/bin/getent group ${sshd_group}`
if [ "X${group}" = "X" ]; then
/usr/sbin/groupadd -g ${sshd_group_gid} ${sshd_group}
fi
#
# Add sshd user
#
user=`/bin/getent passwd ${sshd_user}`
if [ "X${user}" = "X" ]; then
/usr/sbin/useradd -c "SSHD User" -d ${sshd_dir} -m -u ${sshd_user_uid} -g ${sshd_group} -s /bin/false ${sshd_user}
/bin/passwd -l ${sshd_user}
fi
#
0707010002a7f0000041ed00000000000000000000000350ff747d000000000000010000010031ffffffffffffffff0000000500000000root 0707010002a7f1000041ed00000000000000000000000350ff747d000000000000010000010031ffffffffffffffff0000000900000000root/usr 0707010002a7f2000041ed00000000000000000000000850ff747d000000000000010000010031ffffffffffffffff0000000f00000000root/usr/local 0707010002a7ff000041ed00000000000000000000000350ff747d000000000000010000010031ffffffffffffffff0000001300000000root/usr/local/lib 0707010002a800000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000001700000000root/usr/local/lib/smf 0707010002a801000081a400000000000000000000000150ff747d00000dd70000010000010031ffffffffffffffff0000003000000000root/usr/local/lib/smf/openssh.service.manifest
OpenSSH 6.1p1
0707010002a802000081ed00000000000000000000000150ff747d000002540000010000010031ffffffffffffffff0000002e00000000root/usr/local/lib/smf/openssh.service.method #!/sbin/sh
#
. /lib/svc/share/smf_include.sh
CONF_FILE=/usr/local/etc/sshd_config
PIDFILE=/var/run/opensshd.pid
[ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG
case "$1" in
start)
/usr/local/sbin/sshd -f /usr/local/etc/sshd_config
;;
refresh)
if [ -f "$PIDFILE" ]; then
/usr/bin/kill -HUP `/usr/bin/cat $PIDFILE` 2>&1
fi
;;
stop)
if [ -f "$PIDFILE" ]; then
/usr/bin/kill -TERM `/usr/bin/cat $PIDFILE` 2>&1
fi
;;
*)
echo "Usage: $0 {start|stop|refresh}"
exit 1
;;
esac
0707010002a80a000041ed00000000000000000000000350ff747d000000000000010000010031ffffffffffffffff0000001500000000root/usr/local/share 0707010002a80b000041ed00000000000000000000000550ff747d000000000000010000010031ffffffffffffffff0000001900000000root/usr/local/share/man 0707010002a814000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000001e00000000root/usr/local/share/man/man5 0707010002a816000081a400000000000000000000000150ff7427000087670000010000010031ffffffffffffffff0000002b00000000root/usr/local/share/man/man5/ssh_config.5 .TH SSH_CONFIG 5 "June 29 2012 " ""
.SH NAME
\fBssh_config\fP
\- OpenSSH SSH client configuration files
.SH SYNOPSIS
.br
\fB~/.ssh/config\fP
.br
\fB/usr/local/etc/ssh_config\fP
.SH DESCRIPTION
\fBssh\fP(1)
obtains configuration data from the following sources in
the following order:
.IP 1.
command-line options
.IP 2.
user's configuration file
(\fI~/.ssh/config\fP)
.IP 3.
system-wide configuration file
(\fI/usr/local/etc/ssh_config\fP)
For each parameter, the first obtained value
will be used.
The configuration files contain sections separated by
``Host''
specifications, and that section is only applied for hosts that
match one of the patterns given in the specification.
The matched host name is the one given on the command line.
Since the first obtained value for each parameter is used, more
host-specific declarations should be given near the beginning of the
file, and general defaults at the end.
The configuration file has the following format:
Empty lines and lines starting with
`#'
are comments.
Otherwise a line is of the format
``keyword arguments''.
Configuration options may be separated by whitespace or
optional whitespace and exactly one
`=' ;
the latter format is useful to avoid the need to quote whitespace
when specifying configuration options using the
\fBssh\fP,
\fBscp\fP,
and
\fBsftp\fP
\fB\-o\fP
option.
Arguments may optionally be enclosed in double quotes
(\&")
in order to represent arguments containing spaces.
The possible
keywords and their meanings are as follows (note that
keywords are case-insensitive and arguments are case-sensitive):
.TP
\fBHost\fP
Restricts the following declarations (up to the next
\fBHost\fP
keyword) to be only for those hosts that match one of the patterns
given after the keyword.
If more than one pattern is provided, they should be separated by whitespace.
A single
`*'
as a pattern can be used to provide global
defaults for all hosts.
The host is the
\fIhostname\fP
argument given on the command line (i.e. the name is not converted to
a canonicalized host name before matching).
A pattern entry may be negated by prefixing it with an exclamation mark
(`!\&'.)
If a negated entry is matched, then the
\fBHost\fP
entry is ignored, regardless of whether any other patterns on the line
match.
Negated matches are therefore useful to provide exceptions for wildcard
matches.
See
.B PATTERNS
for more information on patterns.
.TP
\fBAddressFamily\fP
Specifies which address family to use when connecting.
Valid arguments are
``any'',
``inet''
(use IPv4 only), or
``inet6''
(use IPv6 only).
.TP
\fBBatchMode\fP
If set to
``yes'',
passphrase/password querying will be disabled.
This option is useful in scripts and other batch jobs where no user
is present to supply the password.
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBBindAddress\fP
Use the specified address on the local machine as the source address of
the connection.
Only useful on systems with more than one address.
Note that this option does not work if
\fBUsePrivilegedPort\fP
is set to
``yes''.
.TP
\fBChallengeResponseAuthentication\fP
Specifies whether to use challenge-response authentication.
The argument to this keyword must be
``yes''
or
``no''.
The default is
``yes''.
.TP
\fBCheckHostIP\fP
If this flag is set to
``yes'',
\fBssh\fP(1)
will additionally check the host IP address in the
\fIknown_hosts\fP
file.
This allows ssh to detect if a host key changed due to DNS spoofing.
If the option is set to
``no'',
the check will not be executed.
The default is
``yes''.
.TP
\fBCipher\fP
Specifies the cipher to use for encrypting the session
in protocol version 1.
Currently,
``blowfish'',
``3des'',
and
``des''
are supported.
\fIdes\fP
is only supported in the
\fBssh\fP(1)
client for interoperability with legacy protocol 1 implementations
that do not support the
\fI3des\fP
cipher.
Its use is strongly discouraged due to cryptographic weaknesses.
The default is
``3des''.
.TP
\fBCiphers\fP
Specifies the ciphers allowed for protocol version 2
in order of preference.
Multiple ciphers must be comma-separated.
The supported ciphers are
``3des-cbc'',
``aes128-cbc'',
``aes192-cbc'',
``aes256-cbc'',
``aes128-ctr'',
``aes192-ctr'',
``aes256-ctr'',
``arcfour128'',
``arcfour256'',
``arcfour'',
``blowfish-cbc'',
and
``cast128-cbc''.
The default is:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
.br
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
.br
aes256-cbc,arcfour
.br
.TP
\fBClearAllForwardings\fP
Specifies that all local, remote, and dynamic port forwardings
specified in the configuration files or on the command line be
cleared.
This option is primarily useful when used from the
\fBssh\fP(1)
command line to clear port forwardings set in
configuration files, and is automatically set by
\fBscp\fP(1)
and
\fBsftp\fP(1).
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBCompression\fP
Specifies whether to use compression.
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBCompressionLevel\fP
Specifies the compression level to use if compression is enabled.
The argument must be an integer from 1 (fast) to 9 (slow, best).
The default level is 6, which is good for most applications.
The meaning of the values is the same as in
\fBgzip\fP(1).
Note that this option applies to protocol version 1 only.
.TP
\fBConnectionAttempts\fP
Specifies the number of tries (one per second) to make before exiting.
The argument must be an integer.
This may be useful in scripts if the connection sometimes fails.
The default is 1.
.TP
\fBConnectTimeout\fP
Specifies the timeout (in seconds) used when connecting to the
SSH server, instead of using the default system TCP timeout.
This value is used only when the target is down or really unreachable,
not when it refuses the connection.
.TP
\fBControlMaster\fP
Enables the sharing of multiple sessions over a single network connection.
When set to
``yes'',
\fBssh\fP(1)
will listen for connections on a control socket specified using the
\fBControlPath\fP
argument.
Additional sessions can connect to this socket using the same
\fBControlPath\fP
with
\fBControlMaster\fP
set to
``no''
(the default).
These sessions will try to reuse the master instance's network connection
rather than initiating new ones, but will fall back to connecting normally
if the control socket does not exist, or is not listening.
Setting this to
``ask''
will cause ssh
to listen for control connections, but require confirmation using the
.IR SSH_ASKPASS
program before they are accepted (see
\fBssh-add\fP(1)
for details).
If the
\fBControlPath\fP
cannot be opened,
ssh will continue without connecting to a master instance.
X11 and
\fBssh-agent\fP(1)
forwarding is supported over these multiplexed connections, however the
display and agent forwarded will be the one belonging to the master
connection i.e. it is not possible to forward multiple displays or agents.
Two additional options allow for opportunistic multiplexing: try to use a
master connection but fall back to creating a new one if one does not already
exist.
These options are:
``auto''
and
``autoask''.
The latter requires confirmation like the
``ask''
option.
.TP
\fBControlPath\fP
Specify the path to the control socket used for connection sharing as described
in the
\fBControlMaster\fP
section above or the string
``none''
to disable connection sharing.
In the path,
`%L'
will be substituted by the first component of the local host name,
`%l'
will be substituted by the local host name (including any domain name),
`%h'
will be substituted by the target host name,
`%n'
will be substituted by the original target host name
specified on the command line,
`%p'
the port,
`%r'
by the remote login username, and
`%u'
by the username of the user running
\fBssh\fP(1).
It is recommended that any
\fBControlPath\fP
used for opportunistic connection sharing include
at least %h, %p, and %r.
This ensures that shared connections are uniquely identified.
.TP
\fBControlPersist\fP
When used in conjunction with
\fBControlMaster\fP,
specifies that the master connection should remain open
in the background (waiting for future client connections)
after the initial client connection has been closed.
If set to
``no'',
then the master connection will not be placed into the background,
and will close as soon as the initial client connection is closed.
If set to
``yes'',
then the master connection will remain in the background indefinitely
(until killed or closed via a mechanism such as the
\fBssh\fP(1)
``Fl O No exit''
option).
If set to a time in seconds, or a time in any of the formats documented in
\fBsshd_config\fP(5),
then the backgrounded master connection will automatically terminate
after it has remained idle (with no client connections) for the
specified time.
.TP
\fBDynamicForward\fP
Specifies that a TCP port on the local machine be forwarded
over the secure channel, and the application
protocol is then used to determine where to connect to from the
remote machine.
The argument must be
[\fIbind_address\fP:]\fIport\fP.
IPv6 addresses can be specified by enclosing addresses in square brackets.
By default, the local port is bound in accordance with the
\fBGatewayPorts\fP
setting.
However, an explicit
\fIbind_address\fP
may be used to bind the connection to a specific address.
The
\fIbind_address\fP
of
``localhost''
indicates that the listening port be bound for local use only, while an
empty address or
`*'
indicates that the port should be available from all interfaces.
Currently the SOCKS4 and SOCKS5 protocols are supported, and
\fBssh\fP(1)
will act as a SOCKS server.
Multiple forwardings may be specified, and
additional forwardings can be given on the command line.
Only the superuser can forward privileged ports.
.TP
\fBEnableSSHKeysign\fP
Setting this option to
``yes''
in the global client configuration file
\fI/usr/local/etc/ssh_config\fP
enables the use of the helper program
\fBssh-keysign\fP(8)
during
\fBHostbasedAuthentication\fP.
The argument must be
``yes''
or
``no''.
The default is
``no''.
This option should be placed in the non-hostspecific section.
See
\fBssh-keysign\fP(8)
for more information.
.TP
\fBEscapeChar\fP
Sets the escape character (default:
`~' ) .
The escape character can also
be set on the command line.
The argument should be a single character,
`^'
followed by a letter, or
``none''
to disable the escape
character entirely (making the connection transparent for binary
data).
.TP
\fBExitOnForwardFailure\fP
Specifies whether
\fBssh\fP(1)
should terminate the connection if it cannot set up all requested
dynamic, tunnel, local, and remote port forwardings.
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBForwardAgent\fP
Specifies whether the connection to the authentication agent (if any)
will be forwarded to the remote machine.
The argument must be
``yes''
or
``no''.
The default is
``no''.
Agent forwarding should be enabled with caution.
Users with the ability to bypass file permissions on the remote host
(for the agent's Unix-domain socket)
can access the local agent through the forwarded connection.
An attacker cannot obtain key material from the agent,
however they can perform operations on the keys that enable them to
authenticate using the identities loaded into the agent.
.TP
\fBForwardX11\fP
Specifies whether X11 connections will be automatically redirected
over the secure channel and
.IR DISPLAY
set.
The argument must be
``yes''
or
``no''.
The default is
``no''.
X11 forwarding should be enabled with caution.
Users with the ability to bypass file permissions on the remote host
(for the user's X11 authorization database)
can access the local X11 display through the forwarded connection.
An attacker may then be able to perform activities such as keystroke monitoring
if the
\fBForwardX11Trusted\fP
option is also enabled.
.TP
\fBForwardX11Timeout\fP
Specify a timeout for untrusted X11 forwarding
using the format described in the
.B TIME FORMATS
section of
\fBsshd_config\fP(5).
X11 connections received by
\fBssh\fP(1)
after this time will be refused.
The default is to disable untrusted X11 forwarding after twenty minutes has
elapsed.
.TP
\fBForwardX11Trusted\fP
If this option is set to
``yes'',
remote X11 clients will have full access to the original X11 display.
If this option is set to
``no'',
remote X11 clients will be considered untrusted and prevented
from stealing or tampering with data belonging to trusted X11
clients.
Furthermore, the
\fBxauth\fP(1)
token used for the session will be set to expire after 20 minutes.
Remote clients will be refused access after this time.
The default is
``no''.
See the X11 SECURITY extension specification for full details on
the restrictions imposed on untrusted clients.
.TP
\fBGatewayPorts\fP
Specifies whether remote hosts are allowed to connect to local
forwarded ports.
By default,
\fBssh\fP(1)
binds local port forwardings to the loopback address.
This prevents other remote hosts from connecting to forwarded ports.
\fBGatewayPorts\fP
can be used to specify that ssh
should bind local port forwardings to the wildcard address,
thus allowing remote hosts to connect to forwarded ports.
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBGlobalKnownHostsFile\fP
Specifies one or more files to use for the global
host key database, separated by whitespace.
The default is
\fI/usr/local/etc/ssh_known_hosts\fP,
\fI/usr/local/etc/ssh_known_hosts2\fP.
.TP
\fBGSSAPIAuthentication\fP
Specifies whether user authentication based on GSSAPI is allowed.
The default is
``no''.
Note that this option applies to protocol version 2 only.
.TP
\fBGSSAPIDelegateCredentials\fP
Forward (delegate) credentials to the server.
The default is
``no''.
Note that this option applies to protocol version 2 only.
.TP
\fBHashKnownHosts\fP
Indicates that
\fBssh\fP(1)
should hash host names and addresses when they are added to
\fI~/.ssh/known_hosts\fP.
These hashed names may be used normally by
\fBssh\fP(1)
and
\fBsshd\fP(8),
but they do not reveal identifying information should the file's contents
be disclosed.
The default is
``no''.
Note that existing names and addresses in known hosts files
will not be converted automatically,
but may be manually hashed using
\fBssh-keygen\fP(1).
.TP
\fBHostbasedAuthentication\fP
Specifies whether to try rhosts based authentication with public key
authentication.
The argument must be
``yes''
or
``no''.
The default is
``no''.
This option applies to protocol version 2 only and
is similar to
\fBRhostsRSAAuthentication\fP.
.TP
\fBHostKeyAlgorithms\fP
Specifies the protocol version 2 host key algorithms
that the client wants to use in order of preference.
The default for this option is:
ecdsa-sha2-nistp256-cert-v01@openssh.com,
.br
ecdsa-sha2-nistp384-cert-v01@openssh.com,
.br
ecdsa-sha2-nistp521-cert-v01@openssh.com,
.br
ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
.br
ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
.br
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
.br
ssh-rsa,ssh-dss
.br
If hostkeys are known for the destination host then this default is modified
to prefer their algorithms.
.TP
\fBHostKeyAlias\fP
Specifies an alias that should be used instead of the
real host name when looking up or saving the host key
in the host key database files.
This option is useful for tunneling SSH connections
or for multiple servers running on a single host.
.TP
\fBHostName\fP
Specifies the real host name to log into.
This can be used to specify nicknames or abbreviations for hosts.
If the hostname contains the character sequence
`%h',
then this will be replaced with the host name specified on the command line
(this is useful for manipulating unqualified names).
The default is the name given on the command line.
Numeric IP addresses are also permitted (both on the command line and in
\fBHostName\fP
specifications).
.TP
\fBIdentitiesOnly\fP
Specifies that
\fBssh\fP(1)
should only use the authentication identity files configured in the
\fBssh_config\fP
files,
even if
\fBssh-agent\fP(1)
offers more identities.
The argument to this keyword must be
``yes''
or
``no''.
This option is intended for situations where ssh-agent
offers many different identities.
The default is
``no''.
.TP
\fBIdentityFile\fP
Specifies a file from which the user's DSA, ECDSA or RSA authentication
identity is read.
The default is
\fI~/.ssh/identity\fP
for protocol version 1, and
\fI~/.ssh/id_dsa\fP,
\fI~/.ssh/id_ecdsa\fP
and
\fI~/.ssh/id_rsa\fP
for protocol version 2.
Additionally, any identities represented by the authentication agent
will be used for authentication.
\fBssh\fP(1)
will try to load certificate information from the filename obtained by
appending
\fI-cert.pub\fP
to the path of a specified
\fBIdentityFile\fP.
The file name may use the tilde
syntax to refer to a user's home directory or one of the following
escape characters:
`%d'
(local user's home directory),
`%u'
(local user name),
`%l'
(local host name),
`%h'
(remote host name) or
`%r'
(remote user name).
It is possible to have
multiple identity files specified in configuration files; all these
identities will be tried in sequence.
Multiple
\fBIdentityFile\fP
directives will add to the list of identities tried (this behaviour
differs from that of other configuration directives).
.TP
\fBIPQoS\fP
Specifies the IPv4 type-of-service or DSCP class for connections.
Accepted values are
``af11'',
``af12'',
``af13'',
``af21'',
``af22'',
``af23'',
``af31'',
``af32'',
``af33'',
``af41'',
``af42'',
``af43'',
``cs0'',
``cs1'',
``cs2'',
``cs3'',
``cs4'',
``cs5'',
``cs6'',
``cs7'',
``ef'',
``lowdelay'',
``throughput'',
``reliability'',
or a numeric value.
This option may take one or two arguments, separated by whitespace.
If one argument is specified, it is used as the packet class unconditionally.
If two values are specified, the first is automatically selected for
interactive sessions and the second for non-interactive sessions.
The default is
``lowdelay''
for interactive sessions and
``throughput''
for non-interactive sessions.
.TP
\fBKbdInteractiveAuthentication\fP
Specifies whether to use keyboard-interactive authentication.
The argument to this keyword must be
``yes''
or
``no''.
The default is
``yes''.
.TP
\fBKbdInteractiveDevices\fP
Specifies the list of methods to use in keyboard-interactive authentication.
Multiple method names must be comma-separated.
The default is to use the server specified list.
The methods available vary depending on what the server supports.
For an OpenSSH server,
it may be zero or more of:
``bsdauth'',
``pam'',
and
``skey''.
.TP
\fBKexAlgorithms\fP
Specifies the available KEX (Key Exchange) algorithms.
Multiple algorithms must be comma-separated.
The default is:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
.br
diffie-hellman-group-exchange-sha256,
.br
diffie-hellman-group-exchange-sha1,
.br
diffie-hellman-group14-sha1,
.br
diffie-hellman-group1-sha1
.br
.TP
\fBLocalCommand\fP
Specifies a command to execute on the local machine after successfully
connecting to the server.
The command string extends to the end of the line, and is executed with
the user's shell.
The following escape character substitutions will be performed:
`%d'
(local user's home directory),
`%h'
(remote host name),
`%l'
(local host name),
`%n'
(host name as provided on the command line),
`%p'
(remote port),
`%r'
(remote user name) or
`%u'
(local user name).
The command is run synchronously and does not have access to the
session of the
\fBssh\fP(1)
that spawned it.
It should not be used for interactive commands.
This directive is ignored unless
\fBPermitLocalCommand\fP
has been enabled.
.TP
\fBLocalForward\fP
Specifies that a TCP port on the local machine be forwarded over
the secure channel to the specified host and port from the remote machine.
The first argument must be
[\fIbind_address\fP:]\fIport\fP
and the second argument must be
\fIhost\fP :\fIhostport\fP.
IPv6 addresses can be specified by enclosing addresses in square brackets.
Multiple forwardings may be specified, and additional forwardings can be
given on the command line.
Only the superuser can forward privileged ports.
By default, the local port is bound in accordance with the
\fBGatewayPorts\fP
setting.
However, an explicit
\fIbind_address\fP
may be used to bind the connection to a specific address.
The
\fIbind_address\fP
of
``localhost''
indicates that the listening port be bound for local use only, while an
empty address or
`*'
indicates that the port should be available from all interfaces.
.TP
\fBLogLevel\fP
Gives the verbosity level that is used when logging messages from
\fBssh\fP(1).
The possible values are:
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
The default is INFO.
DEBUG and DEBUG1 are equivalent.
DEBUG2 and DEBUG3 each specify higher levels of verbose output.
.TP
\fBMACs\fP
Specifies the MAC (message authentication code) algorithms
in order of preference.
The MAC algorithm is used in protocol version 2
for data integrity protection.
Multiple algorithms must be comma-separated.
The default is:
hmac-md5,hmac-sha1,umac-64@openssh.com,
.br
hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
.br
hmac-sha1-96,hmac-md5-96
.br
.TP
\fBNoHostAuthenticationForLocalhost\fP
This option can be used if the home directory is shared across machines.
In this case localhost will refer to a different machine on each of
the machines and the user will get many warnings about changed host keys.
However, this option disables host authentication for localhost.
The argument to this keyword must be
``yes''
or
``no''.
The default is to check the host key for localhost.
.TP
\fBNumberOfPasswordPrompts\fP
Specifies the number of password prompts before giving up.
The argument to this keyword must be an integer.
The default is 3.
.TP
\fBPasswordAuthentication\fP
Specifies whether to use password authentication.
The argument to this keyword must be
``yes''
or
``no''.
The default is
``yes''.
.TP
\fBPermitLocalCommand\fP
Allow local command execution via the
\fBLocalCommand\fP
option or using the
\fB!\& Ns \fIcommand\fP\fP
escape sequence in
\fBssh\fP(1).
The argument must be
``yes''
or
``no''.
The default is
``no''.
.TP
\fBPKCS11Provider\fP
Specifies which PKCS#11 provider to use.
The argument to this keyword is the PKCS#11 shared library
\fBssh\fP(1)
should use to communicate with a PKCS#11 token providing the user's
private RSA key.
.TP
\fBPort\fP
Specifies the port number to connect on the remote host.
The default is 22.
.TP
\fBPreferredAuthentications\fP
Specifies the order in which the client should try protocol 2
authentication methods.
This allows a client to prefer one method (e.g.\&
\fBkeyboard-interactive\fP)
over another method (e.g.\&
\fBpassword\fP).
The default is:
gssapi-with-mic,hostbased,publickey,
.br
keyboard-interactive,password
.br
.TP
\fBProtocol\fP
Specifies the protocol versions
\fBssh\fP(1)
should support in order of preference.
The possible values are
`1'
and
`2'.
Multiple versions must be comma-separated.
When this option is set to
``2,1''
\fBssh\fP
will try version 2 and fall back to version 1
if version 2 is not available.
The default is
`2'.
.TP
\fBProxyCommand\fP
Specifies the command to use to connect to the server.
The command
string extends to the end of the line, and is executed with
the user's shell.
In the command string, any occurrence of
`%h'
will be substituted by the host name to
connect,
`%p'
by the port, and
`%r'
by the remote user name.
The command can be basically anything,
and should read from its standard input and write to its standard output.
It should eventually connect an
\fBsshd\fP(8)
server running on some machine, or execute
\fBsshd -i\fP
somewhere.
Host key management will be done using the
HostName of the host being connected (defaulting to the name typed by
the user).
Setting the command to
``none''
disables this option entirely.
Note that
\fBCheckHostIP\fP
is not available for connects with a proxy command.
This directive is useful in conjunction with
\fBnc\fP(1)
and its proxy support.
For example, the following directive would connect via an HTTP proxy at
192.0.2.0:
ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
.br
.TP
\fBPubkeyAuthentication\fP
Specifies whether to try public key authentication.
The argument to this keyword must be
``yes''
or
``no''.
The default is
``yes''.
This option applies to protocol version 2 only.
.TP
\fBRekeyLimit\fP
Specifies the maximum amount of data that may be transmitted before the
session key is renegotiated.
The argument is the number of bytes, with an optional suffix of
`K',
`M',
or
`G'
to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
The default is between
`1G'
and
`4G',
depending on the cipher.
This option applies to protocol version 2 only.
.TP
\fBRemoteForward\fP
Specifies that a TCP port on the remote machine be forwarded over
the secure channel to the specified host and port from the local machine.
The first argument must be
[\fIbind_address\fP:]\fIport\fP
and the second argument must be
\fIhost\fP :\fIhostport\fP.
IPv6 addresses can be specified by enclosing addresses in square brackets.
Multiple forwardings may be specified, and additional
forwardings can be given on the command line.
Privileged ports can be forwarded only when
logging in as root on the remote machine.
If the
\fIport\fP
argument is
`0',
the listen port will be dynamically allocated on the server and reported
to the client at run time.
If the
\fIbind_address\fP
is not specified, the default is to only bind to loopback addresses.
If the
\fIbind_address\fP
is
`*'
or an empty string, then the forwarding is requested to listen on all
interfaces.
Specifying a remote
\fIbind_address\fP
will only succeed if the server's
\fBGatewayPorts\fP
option is enabled (see
\fBsshd_config\fP(5)) .
.TP
\fBRequestTTY\fP
Specifies whether to request a pseudo-tty for the session.
The argument may be one of:
``no''
(never request a TTY),
``yes''
(always request a TTY when standard input is a TTY),
``force''
(always request a TTY) or
``auto''
(request a TTY when opening a login session).
This option mirrors the
\fB\-t\fP
and
\fB\-T\fP
flags for
\fBssh\fP(1).
.TP
\fBRhostsRSAAuthentication\fP
Specifies whether to try rhosts based authentication with RSA host
authentication.
The argument must be
``yes''
or
``no''.
The default is
``no''.
This option applies to protocol version 1 only and requires
\fBssh\fP(1)
to be setuid root.
.TP
\fBRSAAuthentication\fP
Specifies whether to try RSA authentication.
The argument to this keyword must be
``yes''
or
``no''.
RSA authentication will only be
attempted if the identity file exists, or an authentication agent is
running.
The default is
``yes''.
Note that this option applies to protocol version 1 only.
.TP
\fBSendEnv\fP
Specifies what variables from the local
\fBenviron\fP(7)
should be sent to the server.
Note that environment passing is only supported for protocol 2.
The server must also support it, and the server must be configured to
accept these environment variables.
Refer to
\fBAcceptEnv\fP
in
\fBsshd_config\fP(5)
for how to configure the server.
Variables are specified by name, which may contain wildcard characters.
Multiple environment variables may be separated by whitespace or spread
across multiple
\fBSendEnv\fP
directives.
The default is not to send any environment variables.
See
.B PATTERNS
for more information on patterns.
.TP
\fBServerAliveCountMax\fP
Sets the number of server alive messages (see below) which may be
sent without
\fBssh\fP(1)
receiving any messages back from the server.
If this threshold is reached while server alive messages are being sent,
ssh will disconnect from the server, terminating the session.
It is important to note that the use of server alive messages is very
different from
\fBTCPKeepAlive\fP
(below).
The server alive messages are sent through the encrypted channel
and therefore will not be spoofable.
The TCP keepalive option enabled by
\fBTCPKeepAlive\fP
is spoofable.
The server alive mechanism is valuable when the client or
server depend on knowing when a connection has become inactive.
The default value is 3.
If, for example,
\fBServerAliveInterval\fP
(see below) is set to 15 and
\fBServerAliveCountMax\fP
is left at the default, if the server becomes unresponsive,
ssh will disconnect after approximately 45 seconds.
This option applies to protocol version 2 only.
.TP
\fBServerAliveInterval\fP
Sets a timeout interval in seconds after which if no data has been received
from the server,
\fBssh\fP(1)
will send a message through the encrypted
channel to request a response from the server.
The default
is 0, indicating that these messages will not be sent to the server.
This option applies to protocol version 2 only.
.TP
\fBStrictHostKeyChecking\fP
If this flag is set to
``yes'',
\fBssh\fP(1)
will never automatically add host keys to the
\fI~/.ssh/known_hosts\fP
file, and refuses to connect to hosts whose host key has changed.
This provides maximum protection against trojan horse attacks,
though it can be annoying when the
\fI/usr/local/etc/ssh_known_hosts\fP
file is poorly maintained or when connections to new hosts are
frequently made.
This option forces the user to manually
add all new hosts.
If this flag is set to
``no'',
ssh will automatically add new host keys to the
user known hosts files.
If this flag is set to
``ask'',
new host keys
will be added to the user known host files only after the user
has confirmed that is what they really want to do, and
ssh will refuse to connect to hosts whose host key has changed.
The host keys of
known hosts will be verified automatically in all cases.
The argument must be
``yes'',
``no'',
or
``ask''.
The default is
``ask''.
.TP
\fBTCPKeepAlive\fP
Specifies whether the system should send TCP keepalive messages to the
other side.
If they are sent, death of the connection or crash of one
of the machines will be properly noticed.
However, this means that
connections will die if the route is down temporarily, and some people
find it annoying.
The default is
``yes''
(to send TCP keepalive messages), and the client will notice
if the network goes down or the remote host dies.
This is important in scripts, and many users want it too.
To disable TCP keepalive messages, the value should be set to
``no''.
.TP
\fBTunnel\fP
Request
\fBtun\fP(4)
device forwarding between the client and the server.
The argument must be
``yes'',
``point-to-point''
(layer 3),
``ethernet''
(layer 2),
or
``no''.
Specifying
``yes''
requests the default tunnel mode, which is
``point-to-point''.
The default is
``no''.
.TP
\fBTunnelDevice\fP
Specifies the
\fBtun\fP(4)
devices to open on the client
(\fIlocal_tun\fP)
and the server
(\fIremote_tun\fP.)
The argument must be
\fIlocal_tun\fP[:\fIremote_tun\fP.]
The devices may be specified by numerical ID or the keyword
``any'',
which uses the next available tunnel device.
If
\fIremote_tun\fP
is not specified, it defaults to
``any''.
The default is
``any:any''.
.TP
\fBUsePrivilegedPort\fP
Specifies whether to use a privileged port for outgoing connections.
The argument must be
``yes''
or
``no''.
The default is
``no''.
If set to
``yes'',
\fBssh\fP(1)
must be setuid root.
Note that this option must be set to
``yes''
for
\fBRhostsRSAAuthentication\fP
with older servers.
.TP
\fBUser\fP
Specifies the user to log in as.
This can be useful when a different user name is used on different machines.
This saves the trouble of
having to remember to give the user name on the command line.
.TP
\fBUserKnownHostsFile\fP
Specifies one or more files to use for the user
host key database, separated by whitespace.
The default is
\fI~/.ssh/known_hosts\fP,
\fI~/.ssh/known_hosts2\fP.
.TP
\fBVerifyHostKeyDNS\fP
Specifies whether to verify the remote key using DNS and SSHFP resource
records.
If this option is set to
``yes'',
the client will implicitly trust keys that match a secure fingerprint
from DNS.
Insecure fingerprints will be handled as if this option was set to
``ask''.
If this option is set to
``ask'',
information on fingerprint match will be displayed, but the user will still
need to confirm new host keys according to the
\fBStrictHostKeyChecking\fP
option.
The argument must be
``yes'',
``no'',
or
``ask''.
The default is
``no''.
Note that this option applies to protocol version 2 only.
See also
.B VERIFYING HOST KEYS
in
\fBssh\fP(1).
.TP
\fBVisualHostKey\fP
If this flag is set to
``yes'',
an ASCII art representation of the remote host key fingerprint is
printed in addition to the hex fingerprint string at login and
for unknown host keys.
If this flag is set to
``no'',
no fingerprint strings are printed at login and
only the hex fingerprint string will be printed for unknown host keys.
The default is
``no''.
.TP
\fBXAuthLocation\fP
Specifies the full pathname of the
\fBxauth\fP(1)
program.
The default is
\fI/usr/openwin/bin/xauth\fP.
.SH PATTERNS
A
.IR pattern
consists of zero or more non-whitespace characters,
`*'
(a wildcard that matches zero or more characters),
or
`?\&'
(a wildcard that matches exactly one character).
For example, to specify a set of declarations for any host in the
``.co.uk''
set of domains,
the following pattern could be used:
Dl Host *.co.uk
The following pattern
would match any host in the 192.168.0.[0-9] network range:
Dl Host 192.168.0.?
A
.IR pattern-list
is a comma-separated list of patterns.
Patterns within pattern-lists may be negated
by preceding them with an exclamation mark
(`!\&'.)
For example,
to allow a key to be used from anywhere within an organisation
except from the
``dialup''
pool,
the following entry (in authorized_keys) could be used:
Dl from=\&"!*.dialup.example.com,*.example.com\&"
.SH FILES
.TP
.B ~/.ssh/config
This is the per-user configuration file.
The format of this file is described above.
This file is used by the SSH client.
Because of the potential for abuse, this file must have strict permissions:
read/write for the user, and not accessible by others.
.TP
.B /usr/local/etc/ssh_config
Systemwide configuration file.
This file provides defaults for those
values that are not specified in the user's configuration file, and
for those users who do not have a configuration file.
This file must be world-readable.
.SH SEE ALSO
\fBssh\fP(1)
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
0707010002a815000081a400000000000000000000000150ff742700000a630000010000010031ffffffffffffffff0000002700000000root/usr/local/share/man/man5/moduli.5 .TH MODULI 5 "October 14 2010 " ""
.SH NAME
\fBmoduli\fP
\- Diffie-Hellman moduli
.SH DESCRIPTION
The
\fI/usr/local/etc/moduli\fP
file contains prime numbers and generators for use by
\fBsshd\fP(8)
in the Diffie-Hellman Group Exchange key exchange method.
New moduli may be generated with
\fBssh-keygen\fP(1)
using a two-step process.
An initial
.IR candidate generation
pass, using
\fBssh-keygen -G\fP,
calculates numbers that are likely to be useful.
A second
.IR primality testing
pass, using
\fBssh-keygen -T\fP,
provides a high degree of assurance that the numbers are prime and are
safe for use in Diffie-Hellman operations by
\fBsshd\fP(8).
This
\fBmoduli\fP
format is used as the output from each pass.
The file consists of newline-separated records, one per modulus,
containing seven space-separated fields.
These fields are as follows:
.TP
timestamp
The time that the modulus was last processed as YYYYMMDDHHMMSS.
.TP
type
Decimal number specifying the internal structure of the prime modulus.
Supported types are:
.TP
0
Unknown, not tested.
.TP
2
"Safe" prime; (p-1)/2 is also prime.
.TP
4
Sophie Germain; (p+1)*2 is also prime.
Moduli candidates initially produced by
\fBssh-keygen\fP(1)
are Sophie Germain primes (type 4).
Further primality testing with
\fBssh-keygen\fP(1)
produces safe prime moduli (type 2) that are ready for use in
\fBsshd\fP(8).
Other types are not used by OpenSSH.
.TP
tests
Decimal number indicating the type of primality tests that the number
has been subjected to represented as a bitmask of the following values:
.TP
0x00
Not tested.
.TP
0x01
Composite number \(en not prime.
.TP
0x02
Sieve of Eratosthenes.
.TP
0x04
Probabilistic Miller-Rabin primality tests.
The
\fBssh-keygen\fP(1)
moduli candidate generation uses the Sieve of Eratosthenes (flag 0x02).
Subsequent
\fBssh-keygen\fP(1)
primality tests are Miller-Rabin tests (flag 0x04).
.TP
trials
Decimal number indicating the number of primality trials
that have been performed on the modulus.
.TP
size
Decimal number indicating the size of the prime in bits.
.TP
generator
The recommended generator for use with this modulus (hexadecimal).
.TP
modulus
The modulus itself in hexadecimal.
When performing Diffie-Hellman Group Exchange,
\fBsshd\fP(8)
first estimates the size of the modulus required to produce enough
Diffie-Hellman output to sufficiently key the selected symmetric cipher.
\fBsshd\fP(8)
then randomly selects a modulus from
Fa /usr/local/etc/moduli
that best meets the size requirement.
.SH SEE ALSO
\fBssh-keygen\fP(1),
\fBsshd\fP(8)
\fIDiffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol\fP, RFC 4419, 2006.
0707010002a817000081a400000000000000000000000150ff7427000080f00000010000010031ffffffffffffffff0000002c00000000root/usr/local/share/man/man5/sshd_config.5 .TH SSHD_CONFIG 5 "June 29 2012 " ""
.SH NAME
\fBsshd_config\fP
\- OpenSSH SSH daemon configuration file
.SH SYNOPSIS
.br
\fB/usr/local/etc/sshd_config\fP
.SH DESCRIPTION
\fBsshd\fP(8)
reads configuration data from
\fI/usr/local/etc/sshd_config\fP
(or the file specified with
\fB\-f\fP
on the command line).
The file contains keyword-argument pairs, one per line.
Lines starting with
`#'
and empty lines are interpreted as comments.
Arguments may optionally be enclosed in double quotes
(\&")
in order to represent arguments containing spaces.
The possible
keywords and their meanings are as follows (note that
keywords are case-insensitive and arguments are case-sensitive):
.TP
\fBAcceptEnv\fP
Specifies what environment variables sent by the client will be copied into
the session's
\fBenviron\fP(7).
See
\fBSendEnv\fP
in
\fBssh_config\fP(5)
for how to configure the client.
Note that environment passing is only supported for protocol 2.
Variables are specified by name, which may contain the wildcard characters
`*'
and
`\&?'.
Multiple environment variables may be separated by whitespace or spread
across multiple
\fBAcceptEnv\fP
directives.
Be warned that some environment variables could be used to bypass restricted
user environments.
For this reason, care should be taken in the use of this directive.
The default is not to accept any environment variables.
.TP
\fBAddressFamily\fP
Specifies which address family should be used by
\fBsshd\fP(8).
Valid arguments are
``any'',
``inet''
(use IPv4 only), or
``inet6''
(use IPv6 only).
The default is
``any''.
.TP
\fBAllowAgentForwarding\fP
Specifies whether
\fBssh-agent\fP(1)
forwarding is permitted.
The default is
``yes''.
Note that disabling agent forwarding does not improve security
unless users are also denied shell access, as they can always install
their own forwarders.
.TP
\fBAllowGroups\fP
This keyword can be followed by a list of group name patterns, separated
by spaces.
If specified, login is allowed only for users whose primary
group or supplementary group list matches one of the patterns.
Only group names are valid; a numerical group ID is not recognized.
By default, login is allowed for all groups.
The allow/deny directives are processed in the following order:
\fBDenyUsers\fP,
\fBAllowUsers\fP,
\fBDenyGroups\fP,
and finally
\fBAllowGroups\fP.
See
.B PATTERNS
in
\fBssh_config\fP(5)
for more information on patterns.
.TP
\fBAllowTcpForwarding\fP
Specifies whether TCP forwarding is permitted.
The default is
``yes''.
Note that disabling TCP forwarding does not improve security unless
users are also denied shell access, as they can always install their
own forwarders.
.TP
\fBAllowUsers\fP
This keyword can be followed by a list of user name patterns, separated
by spaces.
If specified, login is allowed only for user names that
match one of the patterns.
Only user names are valid; a numerical user ID is not recognized.
By default, login is allowed for all users.
If the pattern takes the form USER@HOST then USER and HOST
are separately checked, restricting logins to particular
users from particular hosts.
The allow/deny directives are processed in the following order:
\fBDenyUsers\fP,
\fBAllowUsers\fP,
\fBDenyGroups\fP,
and finally
\fBAllowGroups\fP.
See
.B PATTERNS
in
\fBssh_config\fP(5)
for more information on patterns.
.TP
\fBAuthorizedKeysFile\fP
Specifies the file that contains the public keys that can be used
for user authentication.
The format is described in the
.B AUTHORIZED_KEYS FILE FORMAT
section of
\fBsshd\fP(8).
\fBAuthorizedKeysFile\fP
may contain tokens of the form %T which are substituted during connection
setup.
The following tokens are defined: %% is replaced by a literal '%',
%h is replaced by the home directory of the user being authenticated, and
%u is replaced by the username of that user.
After expansion,
\fBAuthorizedKeysFile\fP
is taken to be an absolute path or one relative to the user's home
directory.
Multiple files may be listed, separated by whitespace.
The default is
``.ssh/authorized_keys''.ssh/authorized_keys2 .
.TP
\fBAuthorizedPrincipalsFile\fP
Specifies a file that lists principal names that are accepted for
certificate authentication.
When using certificates signed by a key listed in
\fBTrustedUserCAKeys\fP,
this file lists names, one of which must appear in the certificate for it
to be accepted for authentication.
Names are listed one per line preceded by key options (as described
in
.B AUTHORIZED_KEYS FILE FORMAT
in
\fBsshd\fP(8)) .
Empty lines and comments starting with
`#'
are ignored.
\fBAuthorizedPrincipalsFile\fP
may contain tokens of the form %T which are substituted during connection
setup.
The following tokens are defined: %% is replaced by a literal '%',
%h is replaced by the home directory of the user being authenticated, and
%u is replaced by the username of that user.
After expansion,
\fBAuthorizedPrincipalsFile\fP
is taken to be an absolute path or one relative to the user's home
directory.
The default is
``none'',
i.e. not to use a principals file \(en in this case, the username
of the user must appear in a certificate's principals list for it to be
accepted.
Note that
\fBAuthorizedPrincipalsFile\fP
is only used when authentication proceeds using a CA listed in
\fBTrustedUserCAKeys\fP
and is not consulted for certification authorities trusted via
\fI~/.ssh/authorized_keys\fP,
though the
\fBprincipals=\fP
key option offers a similar facility (see
\fBsshd\fP(8)
for details).
.TP
\fBBanner\fP
The contents of the specified file are sent to the remote user before
authentication is allowed.
If the argument is
``none''
then no banner is displayed.
This option is only available for protocol version 2.
By default, no banner is displayed.
.TP
\fBChallengeResponseAuthentication\fP
Specifies whether challenge-response authentication is allowed (e.g. via
PAM or though authentication styles supported in
\fBlogin.conf\fP(5))
The default is
``yes''.
.TP
\fBChrootDirectory\fP
Specifies the pathname of a directory to
\fBchroot\fP(2)
to after authentication.
All components of the pathname must be root-owned directories that are
not writable by any other user or group.
After the chroot,
\fBsshd\fP(8)
changes the working directory to the user's home directory.
The pathname may contain the following tokens that are expanded at runtime once
the connecting user has been authenticated: %% is replaced by a literal '%',
%h is replaced by the home directory of the user being authenticated, and
%u is replaced by the username of that user.
The
\fBChrootDirectory\fP
must contain the necessary files and directories to support the
user's session.
For an interactive session this requires at least a shell, typically
\fBsh\fP(1),
and basic
\fI/dev\fP
nodes such as
\fBnull\fP(4),
\fBzero\fP(4),
\fBstdin\fP(4),
\fBstdout\fP(4),
\fBstderr\fP(4),
\fBarandom\fP(4)
and
\fBtty\fP(4)
devices.
For file transfer sessions using
``sftp'',
no additional configuration of the environment is necessary if the
in-process sftp server is used,
though sessions which use logging do require
\fI/dev/log\fP
inside the chroot directory (see
\fBsftp-server\fP(8)
for details).
The default is not to
\fBchroot\fP(2).
.TP
\fBCiphers\fP
Specifies the ciphers allowed for protocol version 2.
Multiple ciphers must be comma-separated.
The supported ciphers are
``3des-cbc'',
``aes128-cbc'',
``aes192-cbc'',
``aes256-cbc'',
``aes128-ctr'',
``aes192-ctr'',
``aes256-ctr'',
``arcfour128'',
``arcfour256'',
``arcfour'',
``blowfish-cbc'',
and
``cast128-cbc''.
The default is:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
.br
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
.br
aes256-cbc,arcfour
.br
.TP
\fBClientAliveCountMax\fP
Sets the number of client alive messages (see below) which may be
sent without
\fBsshd\fP(8)
receiving any messages back from the client.
If this threshold is reached while client alive messages are being sent,
sshd will disconnect the client, terminating the session.
It is important to note that the use of client alive messages is very
different from
\fBTCPKeepAlive\fP
(below).
The client alive messages are sent through the encrypted channel
and therefore will not be spoofable.
The TCP keepalive option enabled by
\fBTCPKeepAlive\fP
is spoofable.
The client alive mechanism is valuable when the client or
server depend on knowing when a connection has become inactive.
The default value is 3.
If
\fBClientAliveInterval\fP
(see below) is set to 15, and
\fBClientAliveCountMax\fP
is left at the default, unresponsive SSH clients
will be disconnected after approximately 45 seconds.
This option applies to protocol version 2 only.
.TP
\fBClientAliveInterval\fP
Sets a timeout interval in seconds after which if no data has been received
from the client,
\fBsshd\fP(8)
will send a message through the encrypted
channel to request a response from the client.
The default
is 0, indicating that these messages will not be sent to the client.
This option applies to protocol version 2 only.
.TP
\fBCompression\fP
Specifies whether compression is allowed, or delayed until
the user has authenticated successfully.
The argument must be
``yes'',
``delayed'',
or
``no''.
The default is
``delayed''.
.TP
\fBDenyGroups\fP
This keyword can be followed by a list of group name patterns, separated
by spaces.
Login is disallowed for users whose primary group or supplementary
group list matches one of the patterns.
Only group names are valid; a numerical group ID is not recognized.
By default, login is allowed for all groups.
The allow/deny directives are processed in the following order:
\fBDenyUsers\fP,
\fBAllowUsers\fP,
\fBDenyGroups\fP,
and finally
\fBAllowGroups\fP.
See
.B PATTERNS
in
\fBssh_config\fP(5)
for more information on patterns.
.TP
\fBDenyUsers\fP
This keyword can be followed by a list of user name patterns, separated
by spaces.
Login is disallowed for user names that match one of the patterns.
Only user names are valid; a numerical user ID is not recognized.
By default, login is allowed for all users.
If the pattern takes the form USER@HOST then USER and HOST
are separately checked, restricting logins to particular
users from particular hosts.
The allow/deny directives are processed in the following order:
\fBDenyUsers\fP,
\fBAllowUsers\fP,
\fBDenyGroups\fP,
and finally
\fBAllowGroups\fP.
See
.B PATTERNS
in
\fBssh_config\fP(5)
for more information on patterns.
.TP
\fBForceCommand\fP
Forces the execution of the command specified by
\fBForceCommand\fP,
ignoring any command supplied by the client and
\fI~/.ssh/rc\fP
if present.
The command is invoked by using the user's login shell with the -c option.
This applies to shell, command, or subsystem execution.
It is most useful inside a
\fBMatch\fP
block.
The command originally supplied by the client is available in the
.IR SSH_ORIGINAL_COMMAND
environment variable.
Specifying a command of
``internal-sftp''
will force the use of an in-process sftp server that requires no support
files when used with
\fBChrootDirectory\fP.
.TP
\fBGatewayPorts\fP
Specifies whether remote hosts are allowed to connect to ports
forwarded for the client.
By default,
\fBsshd\fP(8)
binds remote port forwardings to the loopback address.
This prevents other remote hosts from connecting to forwarded ports.
\fBGatewayPorts\fP
can be used to specify that sshd
should allow remote port forwardings to bind to non-loopback addresses, thus
allowing other hosts to connect.
The argument may be
``no''
to force remote port forwardings to be available to the local host only,
``yes''
to force remote port forwardings to bind to the wildcard address, or
``clientspecified''
to allow the client to select the address to which the forwarding is bound.
The default is
``no''.
.TP
\fBGSSAPIAuthentication\fP
Specifies whether user authentication based on GSSAPI is allowed.
The default is
``no''.
Note that this option applies to protocol version 2 only.
.TP
\fBGSSAPICleanupCredentials\fP
Specifies whether to automatically destroy the user's credentials cache
on logout.
The default is
``yes''.
Note that this option applies to protocol version 2 only.
.TP
\fBHostbasedAuthentication\fP
Specifies whether rhosts or /etc/hosts.equiv authentication together
with successful public key client host authentication is allowed
(host-based authentication).
This option is similar to
\fBRhostsRSAAuthentication\fP
and applies to protocol version 2 only.
The default is
``no''.
.TP
\fBHostbasedUsesNameFromPacketOnly\fP
Specifies whether or not the server will attempt to perform a reverse
name lookup when matching the name in the
\fI~/.shosts\fP,
\fI~/.rhosts\fP,
and
\fI/etc/hosts.equiv\fP
files during
\fBHostbasedAuthentication\fP.
A setting of
``yes''
means that
\fBsshd\fP(8)
uses the name supplied by the client rather than
attempting to resolve the name from the TCP connection itself.
The default is
``no''.
.TP
\fBHostCertificate\fP
Specifies a file containing a public host certificate.
The certificate's public key must match a private host key already specified
by
\fBHostKey\fP.
The default behaviour of
\fBsshd\fP(8)
is not to load any certificates.
.TP
\fBHostKey\fP
Specifies a file containing a private host key
used by SSH.
The default is
\fI/usr/local/etc/ssh_host_key\fP
for protocol version 1, and
\fI/usr/local/etc/ssh_host_dsa_key\fP,
\fI/usr/local/etc/ssh_host_ecdsa_key\fP
and
\fI/usr/local/etc/ssh_host_rsa_key\fP
for protocol version 2.
Note that
\fBsshd\fP(8)
will refuse to use a file if it is group/world-accessible.
It is possible to have multiple host key files.
``rsa1''
keys are used for version 1 and
``dsa'',
``ecdsa''
or
``rsa''
are used for version 2 of the SSH protocol.
.TP
\fBIgnoreRhosts\fP
Specifies that
\fI\&.rhosts\fP
and
\fI\&.shosts\fP
files will not be used in
\fBRhostsRSAAuthentication\fP
or
\fBHostbasedAuthentication\fP.
\fI/etc/hosts.equiv\fP
and
\fI/usr/local/etc/shosts.equiv\fP
are still used.
The default is
``yes''.
.TP
\fBIgnoreUserKnownHosts\fP
Specifies whether
\fBsshd\fP(8)
should ignore the user's
\fI~/.ssh/known_hosts\fP
during
\fBRhostsRSAAuthentication\fP
or
\fBHostbasedAuthentication\fP.
The default is
``no''.
.TP
\fBIPQoS\fP
Specifies the IPv4 type-of-service or DSCP class for the connection.
Accepted values are
``af11'',
``af12'',
``af13'',
``af21'',
``af22'',
``af23'',
``af31'',
``af32'',
``af33'',
``af41'',
``af42'',
``af43'',
``cs0'',
``cs1'',
``cs2'',
``cs3'',
``cs4'',
``cs5'',
``cs6'',
``cs7'',
``ef'',
``lowdelay'',
``throughput'',
``reliability'',
or a numeric value.
This option may take one or two arguments, separated by whitespace.
If one argument is specified, it is used as the packet class unconditionally.
If two values are specified, the first is automatically selected for
interactive sessions and the second for non-interactive sessions.
The default is
``lowdelay''
for interactive sessions and
``throughput''
for non-interactive sessions.
.TP
\fBKerberosAuthentication\fP
Specifies whether the password provided by the user for
\fBPasswordAuthentication\fP
will be validated through the Kerberos KDC.
To use this option, the server needs a
Kerberos servtab which allows the verification of the KDC's identity.
The default is
``no''.
.TP
\fBKerberosGetAFSToken\fP
If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
an AFS token before accessing the user's home directory.
The default is
``no''.
.TP
\fBKerberosOrLocalPasswd\fP
If password authentication through Kerberos fails then
the password will be validated via any additional local mechanism
such as
\fI/etc/passwd\fP.
The default is
``yes''.
.TP
\fBKerberosTicketCleanup\fP
Specifies whether to automatically destroy the user's ticket cache
file on logout.
The default is
``yes''.
.TP
\fBKexAlgorithms\fP
Specifies the available KEX (Key Exchange) algorithms.
Multiple algorithms must be comma-separated.
The default is
``ecdh-sha2-nistp256'',
``ecdh-sha2-nistp384'',
``ecdh-sha2-nistp521'',
``diffie-hellman-group-exchange-sha256'',
``diffie-hellman-group-exchange-sha1'',
``diffie-hellman-group14-sha1'',
``diffie-hellman-group1-sha1''.
.TP
\fBKeyRegenerationInterval\fP
In protocol version 1, the ephemeral server key is automatically regenerated
after this many seconds (if it has been used).
The purpose of regeneration is to prevent
decrypting captured sessions by later breaking into the machine and
stealing the keys.
The key is never stored anywhere.
If the value is 0, the key is never regenerated.
The default is 3600 (seconds).
.TP
\fBListenAddress\fP
Specifies the local addresses
\fBsshd\fP(8)
should listen on.
The following forms may be used:
.IP
\fBListenAddress\fP
\fIhost\fP|\fIIPv4_addr\fP|\fIIPv6_addr\fP
.IP
\fBListenAddress\fP
\fIhost\fP|\fIIPv4_addr\fP:\fIport\fP
.IP
\fBListenAddress\fP
[\fIhost\fP|\fIIPv6_addr\fP]:\fIport\fP
If
\fIport\fP
is not specified,
sshd will listen on the address and all prior
\fBPort\fP
options specified.
The default is to listen on all local addresses.
Multiple
\fBListenAddress\fP
options are permitted.
Additionally, any
\fBPort\fP
options must precede this option for non-port qualified addresses.
.TP
\fBLoginGraceTime\fP
The server disconnects after this time if the user has not
successfully logged in.
If the value is 0, there is no time limit.
The default is 120 seconds.
.TP
\fBLogLevel\fP
Gives the verbosity level that is used when logging messages from
\fBsshd\fP(8).
The possible values are:
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
The default is INFO.
DEBUG and DEBUG1 are equivalent.
DEBUG2 and DEBUG3 each specify higher levels of debugging output.
Logging with a DEBUG level violates the privacy of users and is not recommended.
.TP
\fBMACs\fP
Specifies the available MAC (message authentication code) algorithms.
The MAC algorithm is used in protocol version 2
for data integrity protection.
Multiple algorithms must be comma-separated.
The default is:
hmac-md5,hmac-sha1,umac-64@openssh.com,
.br
hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
.br
hmac-sha1-96,hmac-md5-96
.br
.TP
\fBMatch\fP
Introduces a conditional block.
If all of the criteria on the
\fBMatch\fP
line are satisfied, the keywords on the following lines override those
set in the global section of the config file, until either another
\fBMatch\fP
line or the end of the file.
The arguments to
\fBMatch\fP
are one or more criteria-pattern pairs.
The available criteria are
\fBUser\fP,
\fBGroup\fP,
\fBHost\fP,
\fBLocalAddress\fP,
\fBLocalPort\fP,
and
\fBAddress\fP.
The match patterns may consist of single entries or comma-separated
lists and may use the wildcard and negation operators described in the
.B PATTERNS
section of
\fBssh_config\fP(5).
The patterns in an
\fBAddress\fP
criteria may additionally contain addresses to match in CIDR
address/masklen format, e.g.\&
``192.0.2.0/24''
or
``3ffe:ffff::/32''.
Note that the mask length provided must be consistent with the address -
it is an error to specify a mask length that is too long for the address
or one with bits set in this host portion of the address.
For example,
``192.0.2.0/33''
and
``192.0.2.0/8''
respectively.
Only a subset of keywords may be used on the lines following a
\fBMatch\fP
keyword.
Available keywords are
\fBAcceptEnv\fP,
\fBAllowAgentForwarding\fP,
\fBAllowGroups\fP,
\fBAllowTcpForwarding\fP,
\fBAllowUsers\fP,
\fBAuthorizedKeysFile\fP,
\fBAuthorizedPrincipalsFile\fP,
\fBBanner\fP,
\fBChrootDirectory\fP,
\fBDenyGroups\fP,
\fBDenyUsers\fP,
\fBForceCommand\fP,
\fBGatewayPorts\fP,
\fBGSSAPIAuthentication\fP,
\fBHostbasedAuthentication\fP,
\fBHostbasedUsesNameFromPacketOnly\fP,
\fBKbdInteractiveAuthentication\fP,
\fBKerberosAuthentication\fP,
\fBMaxAuthTries\fP,
\fBMaxSessions\fP,
\fBPasswordAuthentication\fP,
\fBPermitEmptyPasswords\fP,
\fBPermitOpen\fP,
\fBPermitRootLogin\fP,
\fBPermitTunnel\fP,
\fBPubkeyAuthentication\fP,
\fBRhostsRSAAuthentication\fP,
\fBRSAAuthentication\fP,
\fBX11DisplayOffset\fP,
\fBX11Forwarding\fP
and
\fBX11UseLocalHost\fP.
.TP
\fBMaxAuthTries\fP
Specifies the maximum number of authentication attempts permitted per
connection.
Once the number of failures reaches half this value,
additional failures are logged.
The default is 6.
.TP
\fBMaxSessions\fP
Specifies the maximum number of open sessions permitted per network connection.
The default is 10.
.TP
\fBMaxStartups\fP
Specifies the maximum number of concurrent unauthenticated connections to the
SSH daemon.
Additional connections will be dropped until authentication succeeds or the
\fBLoginGraceTime\fP
expires for a connection.
The default is 10.
Alternatively, random early drop can be enabled by specifying
the three colon separated values
``start:rate:full''
(e.g. "10:30:60").
\fBsshd\fP(8)
will refuse connection attempts with a probability of
``rate/100''
(30%)
if there are currently
``start''
(10)
unauthenticated connections.
The probability increases linearly and all connection attempts
are refused if the number of unauthenticated connections reaches
``full''
(60).
.TP
\fBPasswordAuthentication\fP
Specifies whether password authentication is allowed.
The default is
``yes''.
.TP
\fBPermitEmptyPasswords\fP
When password authentication is allowed, it specifies whether the
server allows login to accounts with empty password strings.
The default is
``no''.
.TP
\fBPermitOpen\fP
Specifies the destinations to which TCP port forwarding is permitted.
The forwarding specification must be one of the following forms:
.IP
\fBPermitOpen\fP
\fIhost\fP:port
.IP
\fBPermitOpen\fP
\fIIPv4_addr\fP:port
.IP
\fBPermitOpen\fP
\fI\&[\fPIPv6_addr\&]:port
Multiple forwards may be specified by separating them with whitespace.
An argument of
``any''
can be used to remove all restrictions and permit any forwarding requests.
An argument of
``none''
can be used to prohibit all forwarding requests.
By default all port forwarding requests are permitted.
.TP
\fBPermitRootLogin\fP
Specifies whether root can log in using
\fBssh\fP(1).
The argument must be
``yes'',
``without-password'',
``forced-commands-only'',
or
``no''.
The default is
``yes''.
If this option is set to
``without-password'',
password authentication is disabled for root.
If this option is set to
``forced-commands-only'',
root login with public key authentication will be allowed,
but only if the
\fIcommand\fP
option has been specified
(which may be useful for taking remote backups even if root login is
normally not allowed).
All other authentication methods are disabled for root.
If this option is set to
``no'',
root is not allowed to log in.
.TP
\fBPermitTunnel\fP
Specifies whether
\fBtun\fP(4)
device forwarding is allowed.
The argument must be
``yes'',
``point-to-point''
(layer 3),
``ethernet''
(layer 2), or
``no''.
Specifying
``yes''
permits both
``point-to-point''
and
``ethernet''.
The default is
``no''.
.TP
\fBPermitUserEnvironment\fP
Specifies whether
\fI~/.ssh/environment\fP
and
\fBenvironment=\fP
options in
\fI~/.ssh/authorized_keys\fP
are processed by
\fBsshd\fP(8).
The default is
``no''.
Enabling environment processing may enable users to bypass access
restrictions in some configurations using mechanisms such as
.IR LD_PRELOAD .
.TP
\fBPidFile\fP
Specifies the file that contains the process ID of the
SSH daemon.
The default is
\fI/var/run/sshd.pid\fP.
.TP
\fBPort\fP
Specifies the port number that
\fBsshd\fP(8)
listens on.
The default is 22.
Multiple options of this type are permitted.
See also
\fBListenAddress\fP.
.TP
\fBPrintLastLog\fP
Specifies whether
\fBsshd\fP(8)
should print the date and time of the last user login when a user logs
in interactively.
The default is
``yes''.
.TP
\fBPrintMotd\fP
Specifies whether
\fBsshd\fP(8)
should print
\fI/etc/motd\fP
when a user logs in interactively.
(On some systems it is also printed by the shell,
\fI/etc/profile\fP,
or equivalent.)
The default is
``yes''.
.TP
\fBProtocol\fP
Specifies the protocol versions
\fBsshd\fP(8)
supports.
The possible values are
`1'
and
`2'.
Multiple versions must be comma-separated.
The default is
`2'.
Note that the order of the protocol list does not indicate preference,
because the client selects among multiple protocol versions offered
by the server.
Specifying
``2,1''
is identical to
``1,2''.
.TP
\fBPubkeyAuthentication\fP
Specifies whether public key authentication is allowed.
The default is
``yes''.
Note that this option applies to protocol version 2 only.
.TP
\fBRevokedKeys\fP
Specifies a list of revoked public keys.
Keys listed in this file will be refused for public key authentication.
Note that if this file is not readable, then public key authentication will
be refused for all users.
.TP
\fBRhostsRSAAuthentication\fP
Specifies whether rhosts or /etc/hosts.equiv authentication together
with successful RSA host authentication is allowed.
The default is
``no''.
This option applies to protocol version 1 only.
.TP
\fBRSAAuthentication\fP
Specifies whether pure RSA authentication is allowed.
The default is
``yes''.
This option applies to protocol version 1 only.
.TP
\fBServerKeyBits\fP
Defines the number of bits in the ephemeral protocol version 1 server key.
The minimum value is 512, and the default is 1024.
.TP
\fBStrictModes\fP
Specifies whether
\fBsshd\fP(8)
should check file modes and ownership of the
user's files and home directory before accepting login.
This is normally desirable because novices sometimes accidentally leave their
directory or files world-writable.
The default is
``yes''.
Note that this does not apply to
\fBChrootDirectory\fP,
whose permissions and ownership are checked unconditionally.
.TP
\fBSubsystem\fP
Configures an external subsystem (e.g. file transfer daemon).
Arguments should be a subsystem name and a command (with optional arguments)
to execute upon subsystem request.
The command
\fBsftp-server\fP(8)
implements the
``sftp''
file transfer subsystem.
Alternately the name
``internal-sftp''
implements an in-process
``sftp''
server.
This may simplify configurations using
\fBChrootDirectory\fP
to force a different filesystem root on clients.
By default no subsystems are defined.
Note that this option applies to protocol version 2 only.
.TP
\fBSyslogFacility\fP
Gives the facility code that is used when logging messages from
\fBsshd\fP(8).
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
The default is AUTH.
.TP
\fBTCPKeepAlive\fP
Specifies whether the system should send TCP keepalive messages to the
other side.
If they are sent, death of the connection or crash of one
of the machines will be properly noticed.
However, this means that
connections will die if the route is down temporarily, and some people
find it annoying.
On the other hand, if TCP keepalives are not sent,
sessions may hang indefinitely on the server, leaving
``ghost''
users and consuming server resources.
The default is
``yes''
(to send TCP keepalive messages), and the server will notice
if the network goes down or the client host crashes.
This avoids infinitely hanging sessions.
To disable TCP keepalive messages, the value should be set to
``no''.
.TP
\fBTrustedUserCAKeys\fP
Specifies a file containing public keys of certificate authorities that are
trusted to sign user certificates for authentication.
Keys are listed one per line; empty lines and comments starting with
`#'
are allowed.
If a certificate is presented for authentication and has its signing CA key
listed in this file, then it may be used for authentication for any user
listed in the certificate's principals list.
Note that certificates that lack a list of principals will not be permitted
for authentication using
\fBTrustedUserCAKeys\fP.
For more details on certificates, see the
.B CERTIFICATES
section in
\fBssh-keygen\fP(1).
.TP
\fBUseDNS\fP
Specifies whether
\fBsshd\fP(8)
should look up the remote host name and check that
the resolved host name for the remote IP address maps back to the
very same IP address.
The default is
``yes''.
.TP
\fBUseLogin\fP
Specifies whether
\fBlogin\fP(1)
is used for interactive login sessions.
The default is
``no''.
Note that
\fBlogin\fP(1)
is never used for remote command execution.
Note also, that if this is enabled,
\fBX11Forwarding\fP
will be disabled because
\fBlogin\fP(1)
does not know how to handle
\fBxauth\fP(1)
cookies.
If
\fBUsePrivilegeSeparation\fP
is specified, it will be disabled after authentication.
.TP
\fBUsePAM\fP
Enables the Pluggable Authentication Module interface.
If set to
``yes''
this will enable PAM authentication using
\fBChallengeResponseAuthentication\fP
and
\fBPasswordAuthentication\fP
in addition to PAM account and session module processing for all
authentication types.
Because PAM challenge-response authentication usually serves an equivalent
role to password authentication, you should disable either
\fBPasswordAuthentication\fP
or
\fBChallengeResponseAuthentication.\fP
If
\fBUsePAM\fP
is enabled, you will not be able to run
\fBsshd\fP(8)
as a non-root user.
The default is
``no''.
.TP
\fBUsePrivilegeSeparation\fP
Specifies whether
\fBsshd\fP(8)
separates privileges by creating an unprivileged child process
to deal with incoming network traffic.
After successful authentication, another process will be created that has
the privilege of the authenticated user.
The goal of privilege separation is to prevent privilege
escalation by containing any corruption within the unprivileged processes.
The default is
``yes''.
If
\fBUsePrivilegeSeparation\fP
is set to
``sandbox''
then the pre-authentication unprivileged process is subject to additional
restrictions.
.TP
\fBVersionAddendum\fP
Optionally specifies additional text to append to the SSH protocol banner
sent by the server upon connection.
The default is
``none''.
.TP
\fBX11DisplayOffset\fP
Specifies the first display number available for
\fBsshd\fP(8)Ns 's
X11 forwarding.
This prevents sshd from interfering with real X11 servers.
The default is 10.
.TP
\fBX11Forwarding\fP
Specifies whether X11 forwarding is permitted.
The argument must be
``yes''
or
``no''.
The default is
``no''.
When X11 forwarding is enabled, there may be additional exposure to
the server and to client displays if the
\fBsshd\fP(8)
proxy display is configured to listen on the wildcard address (see
\fBX11UseLocalhost\fP
below), though this is not the default.
Additionally, the authentication spoofing and authentication data
verification and substitution occur on the client side.
The security risk of using X11 forwarding is that the client's X11
display server may be exposed to attack when the SSH client requests
forwarding (see the warnings for
\fBForwardX11\fP
in
\fBssh_config\fP(5)) .
A system administrator may have a stance in which they want to
protect clients that may expose themselves to attack by unwittingly
requesting X11 forwarding, which can warrant a
``no''
setting.
Note that disabling X11 forwarding does not prevent users from
forwarding X11 traffic, as users can always install their own forwarders.
X11 forwarding is automatically disabled if
\fBUseLogin\fP
is enabled.
.TP
\fBX11UseLocalhost\fP
Specifies whether
\fBsshd\fP(8)
should bind the X11 forwarding server to the loopback address or to
the wildcard address.
By default,
sshd binds the forwarding server to the loopback address and sets the
hostname part of the
.IR DISPLAY
environment variable to
``localhost''.
This prevents remote hosts from connecting to the proxy display.
However, some older X11 clients may not function with this
configuration.
\fBX11UseLocalhost\fP
may be set to
``no''
to specify that the forwarding server should be bound to the wildcard
address.
The argument must be
``yes''
or
``no''.
The default is
``yes''.
.TP
\fBXAuthLocation\fP
Specifies the full pathname of the
\fBxauth\fP(1)
program.
The default is
\fI/usr/openwin/bin/xauth\fP.
.SH TIME FORMATS
\fBsshd\fP(8)
command-line arguments and configuration file options that specify time
may be expressed using a sequence of the form:
\fItime\fP[\fIqualifier\fP,]
where
\fItime\fP
is a positive integer value and
\fIqualifier\fP
is one of the following:
.TP
<\fBnone\fP>
seconds
.TP
\fBs\fP | \fBS\fP
seconds
.TP
\fBm\fP | \fBM\fP
minutes
.TP
\fBh\fP | \fBH\fP
hours
.TP
\fBd\fP | \fBD\fP
days
.TP
\fBw\fP | \fBW\fP
weeks
Each member of the sequence is added together to calculate
the total time value.
Time format examples:
.TP
600
600 seconds (10 minutes)
.TP
10m
10 minutes
.TP
1h30m
1 hour 30 minutes (90 minutes)
.SH FILES
.TP
.B /usr/local/etc/sshd_config
Contains configuration data for
\fBsshd\fP(8).
This file should be writable by root only, but it is recommended
(though not necessary) that it be world-readable.
.SH SEE ALSO
\fBsshd\fP(8)
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
Niels Provos and Markus Friedl contributed support
for privilege separation.
0707010002a818000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000001e00000000root/usr/local/share/man/man8 0707010002a81b000081a400000000000000000000000150ff7427000002300000010000010031ffffffffffffffff0000003200000000root/usr/local/share/man/man8/ssh-pkcs11-helper.8 .TH SSH-PKCS11-HELPER 8 "February 10 2010 " ""
.SH NAME
\fBssh-pkcs11-helper\fP
\- ssh-agent helper program for PKCS#11 support
.SH SYNOPSIS
.br
\fBssh-pkcs11-helper\fP
.SH DESCRIPTION
\fBssh-pkcs11-helper\fP
is used by
\fBssh-agent\fP(1)
to access keys provided by a PKCS#11 token.
\fBssh-pkcs11-helper\fP
is not intended to be invoked by the user, but from
\fBssh-agent\fP(1).
.SH SEE ALSO
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-agent\fP(1)
.SH HISTORY
\fBssh-pkcs11-helper\fP
first appeared in
OpenBSD 4.7 .
.SH AUTHORS
Markus Friedl
0707010002a81c000081a400000000000000000000000150ff7427000074ba0000010000010031ffffffffffffffff0000002500000000root/usr/local/share/man/man8/sshd.8 .TH SSHD 8 "June 18 2012 " ""
.SH NAME
\fBsshd\fP
\- OpenSSH SSH daemon
.SH SYNOPSIS
.br
\fBsshd\fP
[\fB\-46DdeiqTt\fP]
[\fB\-b\fP \fIbits\fP]
[\fB\-C\fP \fIconnection_spec\fP]
[\fB\-c\fP \fIhost_certificate_file\fP]
[\fB\-f\fP \fIconfig_file\fP]
[\fB\-g\fP \fIlogin_grace_time\fP]
[\fB\-h\fP \fIhost_key_file\fP]
[\fB\-k\fP \fIkey_gen_time\fP]
[\fB\-o\fP \fIoption\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-u\fP \fIlen\fP]
.SH DESCRIPTION
\fBsshd\fP
(OpenSSH Daemon) is the daemon program for
\fBssh\fP(1).
Together these programs replace
\fBrlogin\fP(1)
and
\fBrsh\fP(1),
and provide secure encrypted communications between two untrusted hosts
over an insecure network.
\fBsshd\fP
listens for connections from clients.
It is normally started at boot from
\fI/etc/rc\fP.
It forks a new
daemon for each incoming connection.
The forked daemons handle
key exchange, encryption, authentication, command execution,
and data exchange.
\fBsshd\fP
can be configured using command-line options or a configuration file
(by default
\fBsshd_config\fP(5)) ;
command-line options override values specified in the
configuration file.
\fBsshd\fP
rereads its configuration file when it receives a hangup signal,
.BR SIGHUP ,
by executing itself with the name and options it was started with, e.g.\&
\fI/usr/sbin/sshd\fP.
The options are as follows:
.TP
\fB\-4\fP
Forces
\fBsshd\fP
to use IPv4 addresses only.
.TP
\fB\-6\fP
Forces
\fBsshd\fP
to use IPv6 addresses only.
.TP
\fB\-b\fP \fIbits\fP
Specifies the number of bits in the ephemeral protocol version 1
server key (default 1024).
.TP
\fB\-C\fP \fIconnection_spec\fP
Specify the connection parameters to use for the
\fB\-T\fP
extended test mode.
If provided, any
\fBMatch\fP
directives in the configuration file
that would apply to the specified user, host, and address will be set before
the configuration is written to standard output.
The connection parameters are supplied as keyword=value pairs.
The keywords are
``user'',
``host'',
``laddr'',
``lport'',
and
``addr''.
All are required and may be supplied in any order, either with multiple
\fB\-C\fP
options or as a comma-separated list.
.TP
\fB\-c\fP \fIhost_certificate_file\fP
Specifies a path to a certificate file to identify
\fBsshd\fP
during key exchange.
The certificate file must match a host key file specified using the
\fB\-h\fP
option or the
\fBHostKey\fP
configuration directive.
.TP
\fB\-D\fP
When this option is specified,
\fBsshd\fP
will not detach and does not become a daemon.
This allows easy monitoring of
\fBsshd\fP.
.TP
\fB\-d\fP
Debug mode.
The server sends verbose debug output to standard error,
and does not put itself in the background.
The server also will not fork and will only process one connection.
This option is only intended for debugging for the server.
Multiple
\fB\-d\fP
options increase the debugging level.
Maximum is 3.
.TP
\fB\-e\fP
When this option is specified,
\fBsshd\fP
will send the output to the standard error instead of the system log.
.TP
\fB\-f\fP \fIconfig_file\fP
Specifies the name of the configuration file.
The default is
\fI/usr/local/etc/sshd_config\fP.
\fBsshd\fP
refuses to start if there is no configuration file.
.TP
\fB\-g\fP \fIlogin_grace_time\fP
Gives the grace time for clients to authenticate themselves (default
120 seconds).
If the client fails to authenticate the user within
this many seconds, the server disconnects and exits.
A value of zero indicates no limit.
.TP
\fB\-h\fP \fIhost_key_file\fP
Specifies a file from which a host key is read.
This option must be given if
\fBsshd\fP
is not run as root (as the normal
host key files are normally not readable by anyone but root).
The default is
\fI/usr/local/etc/ssh_host_key\fP
for protocol version 1, and
\fI/usr/local/etc/ssh_host_dsa_key\fP,
\fI/usr/local/etc/ssh_host_ecdsa_key\fP
and
\fI/usr/local/etc/ssh_host_rsa_key\fP
for protocol version 2.
It is possible to have multiple host key files for
the different protocol versions and host key algorithms.
.TP
\fB\-i\fP
Specifies that
\fBsshd\fP
is being run from
\fBinetd\fP(8).
\fBsshd\fP
is normally not run
from inetd because it needs to generate the server key before it can
respond to the client, and this may take tens of seconds.
Clients would have to wait too long if the key was regenerated every time.
However, with small key sizes (e.g. 512) using
\fBsshd\fP
from inetd may
be feasible.
.TP
\fB\-k\fP \fIkey_gen_time\fP
Specifies how often the ephemeral protocol version 1 server key is
regenerated (default 3600 seconds, or one hour).
The motivation for regenerating the key fairly
often is that the key is not stored anywhere, and after about an hour
it becomes impossible to recover the key for decrypting intercepted
communications even if the machine is cracked into or physically
seized.
A value of zero indicates that the key will never be regenerated.
.TP
\fB\-o\fP \fIoption\fP
Can be used to give options in the format used in the configuration file.
This is useful for specifying options for which there is no separate
command-line flag.
For full details of the options, and their values, see
\fBsshd_config\fP(5).
.TP
\fB\-p\fP \fIport\fP
Specifies the port on which the server listens for connections
(default 22).
Multiple port options are permitted.
Ports specified in the configuration file with the
\fBPort\fP
option are ignored when a command-line port is specified.
Ports specified using the
\fBListenAddress\fP
option override command-line ports.
.TP
\fB\-q\fP
Quiet mode.
Nothing is sent to the system log.
Normally the beginning,
authentication, and termination of each connection is logged.
.TP
\fB\-T\fP
Extended test mode.
Check the validity of the configuration file, output the effective configuration
to stdout and then exit.
Optionally,
\fBMatch\fP
rules may be applied by specifying the connection parameters using one or more
\fB\-C\fP
options.
.TP
\fB\-t\fP
Test mode.
Only check the validity of the configuration file and sanity of the keys.
This is useful for updating
\fBsshd\fP
reliably as configuration options may change.
.TP
\fB\-u\fP \fIlen\fP
This option is used to specify the size of the field
in the
utmp
structure that holds the remote host name.
If the resolved host name is longer than
\fIlen\fP,
the dotted decimal value will be used instead.
This allows hosts with very long host names that
overflow this field to still be uniquely identified.
Specifying
\fB\-u0\fP
indicates that only dotted decimal addresses
should be put into the
\fIutmp\fP
file.
\fB\-u0\fP
may also be used to prevent
\fBsshd\fP
from making DNS requests unless the authentication
mechanism or configuration requires it.
Authentication mechanisms that may require DNS include
\fBRhostsRSAAuthentication\fP,
\fBHostbasedAuthentication\fP,
and using a
\fBfrom="pattern-list"\fP
option in a key file.
Configuration options that require DNS include using a
USER@HOST pattern in
\fBAllowUsers\fP
or
\fBDenyUsers\fP.
.SH AUTHENTICATION
The OpenSSH SSH daemon supports SSH protocols 1 and 2.
The default is to use protocol 2 only,
though this can be changed via the
\fBProtocol\fP
option in
\fBsshd_config\fP(5).
Protocol 2 supports DSA, ECDSA and RSA keys;
protocol 1 only supports RSA keys.
For both protocols,
each host has a host-specific key,
normally 2048 bits,
used to identify the host.
Forward security for protocol 1 is provided through
an additional server key,
normally 768 bits,
generated when the server starts.
This key is normally regenerated every hour if it has been used, and
is never stored on disk.
Whenever a client connects, the daemon responds with its public
host and server keys.
The client compares the
RSA host key against its own database to verify that it has not changed.
The client then generates a 256-bit random number.
It encrypts this
random number using both the host key and the server key, and sends
the encrypted number to the server.
Both sides then use this
random number as a session key which is used to encrypt all further
communications in the session.
The rest of the session is encrypted
using a conventional cipher, currently Blowfish or 3DES, with 3DES
being used by default.
The client selects the encryption algorithm
to use from those offered by the server.
For protocol 2,
forward security is provided through a Diffie-Hellman key agreement.
This key agreement results in a shared session key.
The rest of the session is encrypted using a symmetric cipher, currently
128-bit AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.
The client selects the encryption algorithm
to use from those offered by the server.
Additionally, session integrity is provided
through a cryptographic message authentication code
(hmac-md5, hmac-sha1, umac-64, hmac-ripemd160,
hmac-sha2-256 or hmac-sha2-512).
Finally, the server and the client enter an authentication dialog.
The client tries to authenticate itself using
host-based authentication,
public key authentication,
challenge-response authentication,
or password authentication.
Regardless of the authentication type, the account is checked to
ensure that it is accessible. An account is not accessible if it is
locked, listed in
\fBDenyUsers\fP
or its group is listed in
\fBDenyGroups\fP
\&. The definition of a locked account is system dependant. Some platforms
have their own account database (eg AIX) and some modify the passwd field (
`\&*LK\&*'
on Solaris and UnixWare,
`\&*'
on HP-UX, containing
`Nologin'
on Tru64,
a leading
`\&*LOCKED\&*'
on FreeBSD and a leading
`\&!'
on most Linuxes).
If there is a requirement to disable password authentication
for the account while allowing still public-key, then the passwd field
should be set to something other than these values (eg
`NP'
or
`\&*NP\&*'
).
If the client successfully authenticates itself, a dialog for
preparing the session is entered.
At this time the client may request
things like allocating a pseudo-tty, forwarding X11 connections,
forwarding TCP connections, or forwarding the authentication agent
connection over the secure channel.
After this, the client either requests a shell or execution of a command.
The sides then enter session mode.
In this mode, either side may send
data at any time, and such data is forwarded to/from the shell or
command on the server side, and the user terminal in the client side.
When the user program terminates and all forwarded X11 and other
connections have been closed, the server sends command exit status to
the client, and both sides exit.
.SH LOGIN PROCESS
When a user successfully logs in,
\fBsshd\fP
does the following:
.IP 1.
If the login is on a tty, and no command has been specified,
prints last login time and
\fI/etc/motd\fP
(unless prevented in the configuration file or by
\fI~/.hushlogin\fP;
see the
.B FILES
section).
.IP 2.
If the login is on a tty, records login time.
.IP 3.
Checks
\fI/etc/nologin\fP;
if it exists, prints contents and quits
(unless root).
.IP 4.
Changes to run with normal user privileges.
.IP 5.
Sets up basic environment.
.IP 6.
Reads the file
\fI~/.ssh/environment\fP,
if it exists, and users are allowed to change their environment.
See the
\fBPermitUserEnvironment\fP
option in
\fBsshd_config\fP(5).
.IP 7.
Changes to user's home directory.
.IP 8.
If
\fI~/.ssh/rc\fP
exists, runs it; else if
\fI/usr/local/etc/sshrc\fP
exists, runs
it; otherwise runs xauth.
The
``rc''
files are given the X11
authentication protocol and cookie in standard input.
See
.B SSHRC ,
below.
.IP 9.
Runs user's shell or command.
.SH SSHRC
If the file
\fI~/.ssh/rc\fP
exists,
\fBsh\fP(1)
runs it after reading the
environment files but before starting the user's shell or command.
It must not produce any output on stdout; stderr must be used
instead.
If X11 forwarding is in use, it will receive the "proto cookie" pair in
its standard input (and
.IR DISPLAY
in its environment).
The script must call
\fBxauth\fP(1)
because
\fBsshd\fP
will not run xauth automatically to add X11 cookies.
The primary purpose of this file is to run any initialization routines
which may be needed before the user's home directory becomes
accessible; AFS is a particular example of such an environment.
This file will probably contain some initialization code followed by
something similar to:
if read proto cookie && [ -n "$DISPLAY" ]; then
.br
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
.br
# X11UseLocalhost=yes
.br
echo add unix:`echo $DISPLAY |
.br
cut -c11-` $proto $cookie
.br
else
.br
# X11UseLocalhost=no
.br
echo add $DISPLAY $proto $cookie
.br
fi | xauth -q -
.br
fi
.br
If this file does not exist,
\fI/usr/local/etc/sshrc\fP
is run, and if that
does not exist either, xauth is used to add the cookie.
.SH AUTHORIZED_KEYS FILE FORMAT
\fBAuthorizedKeysFile\fP
specifies the files containing public keys for
public key authentication;
if none is specified, the default is
\fI~/.ssh/authorized_keys\fP
and
\fI~/.ssh/authorized_keys2\fP.
Each line of the file contains one
key (empty lines and lines starting with a
`#'
are ignored as
comments).
Protocol 1 public keys consist of the following space-separated fields:
options, bits, exponent, modulus, comment.
Protocol 2 public key consist of:
options, keytype, base64-encoded key, comment.
The options field is optional;
its presence is determined by whether the line starts
with a number or not (the options field never starts with a number).
The bits, exponent, modulus, and comment fields give the RSA key for
protocol version 1; the
comment field is not used for anything (but may be convenient for the
user to identify the key).
For protocol version 2 the keytype is
``ecdsa-sha2-nistp256'',
``ecdsa-sha2-nistp384'',
``ecdsa-sha2-nistp521'',
``ssh-dss''
or
``ssh-rsa''.
Note that lines in this file are usually several hundred bytes long
(because of the size of the public key encoding) up to a limit of
8 kilobytes, which permits DSA keys up to 8 kilobits and RSA
keys up to 16 kilobits.
You don't want to type them in; instead, copy the
\fIidentity.pub\fP,
\fIid_dsa.pub\fP,
\fIid_ecdsa.pub\fP,
or the
\fIid_rsa.pub\fP
file and edit it.
\fBsshd\fP
enforces a minimum RSA key modulus size for protocol 1
and protocol 2 keys of 768 bits.
The options (if present) consist of comma-separated option
specifications.
No spaces are permitted, except within double quotes.
The following option specifications are supported (note
that option keywords are case-insensitive):
.TP
\fBcert-authority\fP
Specifies that the listed key is a certification authority (CA) that is
trusted to validate signed certificates for user authentication.
Certificates may encode access restrictions similar to these key options.
If both certificate restrictions and key options are present, the most
restrictive union of the two is applied.
.TP
\fBcommand="command"\fP
Specifies that the command is executed whenever this key is used for
authentication.
The command supplied by the user (if any) is ignored.
The command is run on a pty if the client requests a pty;
otherwise it is run without a tty.
If an 8-bit clean channel is required,
one must not request a pty or should specify
\fBno-pty\fP.
A quote may be included in the command by quoting it with a backslash.
This option might be useful
to restrict certain public keys to perform just a specific operation.
An example might be a key that permits remote backups but nothing else.
Note that the client may specify TCP and/or X11
forwarding unless they are explicitly prohibited.
The command originally supplied by the client is available in the
.IR SSH_ORIGINAL_COMMAND
environment variable.
Note that this option applies to shell, command or subsystem execution.
Also note that this command may be superseded by either a
\fBsshd_config\fP(5)
\fBForceCommand\fP
directive or a command embedded in a certificate.
.TP
\fBenvironment="NAME=value"\fP
Specifies that the string is to be added to the environment when
logging in using this key.
Environment variables set this way
override other default environment values.
Multiple options of this type are permitted.
Environment processing is disabled by default and is
controlled via the
\fBPermitUserEnvironment\fP
option.
This option is automatically disabled if
\fBUseLogin\fP
is enabled.
.TP
\fBfrom="pattern-list"\fP
Specifies that in addition to public key authentication, either the canonical
name of the remote host or its IP address must be present in the
comma-separated list of patterns.
See
.B PATTERNS
in
\fBssh_config\fP(5)
for more information on patterns.
In addition to the wildcard matching that may be applied to hostnames or
addresses, a
\fBfrom\fP
stanza may match IP addresses using CIDR address/masklen notation.
The purpose of this option is to optionally increase security: public key
authentication by itself does not trust the network or name servers or
anything (but the key); however, if somebody somehow steals the key, the key
permits an intruder to log in from anywhere in the world.
This additional option makes using a stolen key more difficult (name
servers and/or routers would have to be compromised in addition to
just the key).
.TP
\fBno-agent-forwarding\fP
Forbids authentication agent forwarding when this key is used for
authentication.
.TP
\fBno-port-forwarding\fP
Forbids TCP forwarding when this key is used for authentication.
Any port forward requests by the client will return an error.
This might be used, e.g. in connection with the
\fBcommand\fP
option.
.TP
\fBno-pty\fP
Prevents tty allocation (a request to allocate a pty will fail).
.TP
\fBno-user-rc\fP
Disables execution of
\fI~/.ssh/rc\fP.
.TP
\fBno-X11-forwarding\fP
Forbids X11 forwarding when this key is used for authentication.
Any X11 forward requests by the client will return an error.
.TP
\fBpermitopen="host:port"\fP
Limit local
``ssh -L''
port forwarding such that it may only connect to the specified host and
port.
IPv6 addresses can be specified by enclosing the address in square brackets.
Multiple
\fBpermitopen\fP
options may be applied separated by commas.
No pattern matching is performed on the specified hostnames,
they must be literal domains or addresses.
A port specification of
\fB*\fP
matches any port.
.TP
\fBprincipals="principals"\fP
On a
\fBcert-authority\fP
line, specifies allowed principals for certificate authentication as a
comma-separated list.
At least one name from the list must appear in the certificate's
list of principals for the certificate to be accepted.
This option is ignored for keys that are not marked as trusted certificate
signers using the
\fBcert-authority\fP
option.
.TP
\fBtunnel="n"\fP
Force a
\fBtun\fP(4)
device on the server.
Without this option, the next available device will be used if
the client requests a tunnel.
An example authorized_keys file:
# Comments allowed at start of line
.br
ssh-rsa AAAAB3Nza...LiPk== user@example.net
.br
from="*.sales.example.net,!pc.sales.example.net" ssh-rsa
.br
AAAAB2...19Q== john@example.net
.br
command="dump /home",no-pty,no-port-forwarding ssh-dss
.br
AAAAC3...51R== example.net
.br
permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
.br
AAAAB5...21S==
.br
tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
.br
jane@example.net
.br
.SH SSH_KNOWN_HOSTS FILE FORMAT
The
\fI/usr/local/etc/ssh_known_hosts\fP
and
\fI~/.ssh/known_hosts\fP
files contain host public keys for all known hosts.
The global file should
be prepared by the administrator (optional), and the per-user file is
maintained automatically: whenever the user connects from an unknown host,
its key is added to the per-user file.
Each line in these files contains the following fields: markers (optional),
hostnames, bits, exponent, modulus, comment.
The fields are separated by spaces.
The marker is optional, but if it is present then it must be one of
``@cert-authority'',
to indicate that the line contains a certification authority (CA) key,
or
``@revoked'',
to indicate that the key contained on the line is revoked and must not ever
be accepted.
Only one marker should be used on a key line.
Hostnames is a comma-separated list of patterns
(`*'
and
`\&?'
act as
wildcards); each pattern in turn is matched against the canonical host
name (when authenticating a client) or against the user-supplied
name (when authenticating a server).
A pattern may also be preceded by
`\&!'
to indicate negation: if the host name matches a negated
pattern, it is not accepted (by that line) even if it matched another
pattern on the line.
A hostname or address may optionally be enclosed within
`\&['
and
`\&]'
brackets then followed by
`\&:'
and a non-standard port number.
Alternately, hostnames may be stored in a hashed form which hides host names
and addresses should the file's contents be disclosed.
Hashed hostnames start with a
`|'
character.
Only one hashed hostname may appear on a single line and none of the above
negation or wildcard operators may be applied.
Bits, exponent, and modulus are taken directly from the RSA host key; they
can be obtained, for example, from
\fI/usr/local/etc/ssh_host_key.pub\fP.
The optional comment field continues to the end of the line, and is not used.
Lines starting with
`#'
and empty lines are ignored as comments.
When performing host authentication, authentication is accepted if any
matching line has the proper key; either one that matches exactly or,
if the server has presented a certificate for authentication, the key
of the certification authority that signed the certificate.
For a key to be trusted as a certification authority, it must use the
``@cert-authority''
marker described above.
The known hosts file also provides a facility to mark keys as revoked,
for example when it is known that the associated private key has been
stolen.
Revoked keys are specified by including the
``@revoked''
marker at the beginning of the key line, and are never accepted for
authentication or as certification authorities, but instead will
produce a warning from
\fBssh\fP(1)
when they are encountered.
It is permissible (but not
recommended) to have several lines or different host keys for the same
names.
This will inevitably happen when short forms of host names
from different domains are put in the file.
It is possible
that the files contain conflicting information; authentication is
accepted if valid information can be found from either file.
Note that the lines in these files are typically hundreds of characters
long, and you definitely don't want to type in the host keys by hand.
Rather, generate them by a script,
\fBssh-keyscan\fP(1)
or by taking
\fI/usr/local/etc/ssh_host_key.pub\fP
and adding the host names at the front.
\fBssh-keygen\fP(1)
also offers some basic automated editing for
\fI~/.ssh/known_hosts\fP
including removing hosts matching a host name and converting all host
names to their hashed representations.
An example ssh_known_hosts file:
# Comments allowed at start of line
.br
closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
.br
cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
.br
# A hashed hostname
.br
|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
.br
AAAA1234.....=
.br
# A revoked key
.br
@revoked * ssh-rsa AAAAB5W...
.br
# A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
.br
@cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
.br
.SH FILES
.TP
.B ~/.hushlogin
This file is used to suppress printing the last login time and
\fI/etc/motd\fP,
if
\fBPrintLastLog\fP
and
\fBPrintMotd\fP,
respectively,
are enabled.
It does not suppress printing of the banner specified by
\fBBanner\fP.
.TP
.B ~/.rhosts
This file is used for host-based authentication (see
\fBssh\fP(1)
for more information).
On some machines this file may need to be
world-readable if the user's home directory is on an NFS partition,
because
\fBsshd\fP
reads it as root.
Additionally, this file must be owned by the user,
and must not have write permissions for anyone else.
The recommended
permission for most machines is read/write for the user, and not
accessible by others.
.TP
.B ~/.shosts
This file is used in exactly the same way as
\fI\&.rhosts\fP,
but allows host-based authentication without permitting login with
rlogin/rsh.
.TP
.B ~/.ssh/
This directory is the default location for all user-specific configuration
and authentication information.
There is no general requirement to keep the entire contents of this directory
secret, but the recommended permissions are read/write/execute for the user,
and not accessible by others.
.TP
.B ~/.ssh/authorized_keys
Lists the public keys (DSA/ECDSA/RSA) that can be used for logging in
as this user.
The format of this file is described above.
The content of the file is not highly sensitive, but the recommended
permissions are read/write for the user, and not accessible by others.
If this file, the
\fI~/.ssh\fP
directory, or the user's home directory are writable
by other users, then the file could be modified or replaced by unauthorized
users.
In this case,
\fBsshd\fP
will not allow it to be used unless the
\fBStrictModes\fP
option has been set to
``no''.
.TP
.B ~/.ssh/environment
This file is read into the environment at login (if it exists).
It can only contain empty lines, comment lines (that start with
`#' ) ,
and assignment lines of the form name=value.
The file should be writable
only by the user; it need not be readable by anyone else.
Environment processing is disabled by default and is
controlled via the
\fBPermitUserEnvironment\fP
option.
.TP
.B ~/.ssh/known_hosts
Contains a list of host keys for all hosts the user has logged into
that are not already in the systemwide list of known host keys.
The format of this file is described above.
This file should be writable only by root/the owner and
can, but need not be, world-readable.
.TP
.B ~/.ssh/rc
Contains initialization routines to be run before
the user's home directory becomes accessible.
This file should be writable only by the user, and need not be
readable by anyone else.
.TP
.B /etc/hosts.allow
.TP
.B /etc/hosts.deny
Access controls that should be enforced by tcp-wrappers are defined here.
Further details are described in
\fBhosts_access\fP(5).
.TP
.B /etc/hosts.equiv
This file is for host-based authentication (see
\fBssh\fP(1)) .
It should only be writable by root.
.TP
.B /usr/local/etc/moduli
Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
The file format is described in
\fBmoduli\fP(5).
.TP
.B /etc/motd
See
\fBmotd\fP(5).
.TP
.B /etc/nologin
If this file exists,
\fBsshd\fP
refuses to let anyone except root log in.
The contents of the file
are displayed to anyone trying to log in, and non-root connections are
refused.
The file should be world-readable.
.TP
.B /usr/local/etc/shosts.equiv
This file is used in exactly the same way as
\fIhosts.equiv\fP,
but allows host-based authentication without permitting login with
rlogin/rsh.
.TP
.B /usr/local/etc/ssh_host_key
.TP
.B /usr/local/etc/ssh_host_dsa_key
.TP
.B /usr/local/etc/ssh_host_ecdsa_key
.TP
.B /usr/local/etc/ssh_host_rsa_key
These files contain the private parts of the host keys.
These files should only be owned by root, readable only by root, and not
accessible to others.
Note that
\fBsshd\fP
does not start if these files are group/world-accessible.
.TP
.B /usr/local/etc/ssh_host_key.pub
.TP
.B /usr/local/etc/ssh_host_dsa_key.pub
.TP
.B /usr/local/etc/ssh_host_ecdsa_key.pub
.TP
.B /usr/local/etc/ssh_host_rsa_key.pub
These files contain the public parts of the host keys.
These files should be world-readable but writable only by
root.
Their contents should match the respective private parts.
These files are not
really used for anything; they are provided for the convenience of
the user so their contents can be copied to known hosts files.
These files are created using
\fBssh-keygen\fP(1).
.TP
.B /usr/local/etc/ssh_known_hosts
Systemwide list of known host keys.
This file should be prepared by the
system administrator to contain the public host keys of all machines in the
organization.
The format of this file is described above.
This file should be writable only by root/the owner and
should be world-readable.
.TP
.B /usr/local/etc/sshd_config
Contains configuration data for
\fBsshd\fP.
The file format and configuration options are described in
\fBsshd_config\fP(5).
.TP
.B /usr/local/etc/sshrc
Similar to
\fI~/.ssh/rc\fP,
it can be used to specify
machine-specific login-time initializations globally.
This file should be writable only by root, and should be world-readable.
.TP
.B /var/empty
\fBchroot\fP(2)
directory used by
\fBsshd\fP
during privilege separation in the pre-authentication phase.
The directory should not contain any files and must be owned by root
and not group or world-writable.
.TP
.B /var/run/sshd.pid
Contains the process ID of the
\fBsshd\fP
listening for connections (if there are several daemons running
concurrently for different ports, this contains the process ID of the one
started last).
The content of this file is not sensitive; it can be world-readable.
.SH SEE ALSO
\fBscp\fP(1),
\fBsftp\fP(1),
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-agent\fP(1),
\fBssh-keygen\fP(1),
\fBssh-keyscan\fP(1),
\fBchroot\fP(2),
\fBhosts_access\fP(5),
\fBlogin.conf\fP(5),
\fBmoduli\fP(5),
\fBsshd_config\fP(5),
\fBinetd\fP(8),
\fBsftp-server\fP(8)
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
Niels Provos and Markus Friedl contributed support
for privilege separation.
.SH CAVEATS
System security is not improved unless
\fBrshd\fP,
\fBrlogind\fP,
and
\fBrexecd\fP
are disabled (thus completely disabling
\fBrlogin\fP()
and
\fBrsh\fP()
into the machine).
0707010002a81a000081a400000000000000000000000150ff7427000006870000010000010031ffffffffffffffff0000002c00000000root/usr/local/share/man/man8/ssh-keysign.8 .TH SSH-KEYSIGN 8 "August 31 2010 " ""
.SH NAME
\fBssh-keysign\fP
\- ssh helper program for host-based authentication
.SH SYNOPSIS
.br
\fBssh-keysign\fP
.SH DESCRIPTION
\fBssh-keysign\fP
is used by
\fBssh\fP(1)
to access the local host keys and generate the digital signature
required during host-based authentication with SSH protocol version 2.
\fBssh-keysign\fP
is disabled by default and can only be enabled in the
global client configuration file
\fI/usr/local/etc/ssh_config\fP
by setting
\fBEnableSSHKeysign\fP
to
``yes''.
\fBssh-keysign\fP
is not intended to be invoked by the user, but from
\fBssh\fP(1).
See
\fBssh\fP(1)
and
\fBsshd\fP(8)
for more information about host-based authentication.
.SH FILES
.TP
.B /usr/local/etc/ssh_config
Controls whether
\fBssh-keysign\fP
is enabled.
.TP
.B /usr/local/etc/ssh_host_dsa_key
.TP
.B /usr/local/etc/ssh_host_ecdsa_key
.TP
.B /usr/local/etc/ssh_host_rsa_key
These files contain the private parts of the host keys used to
generate the digital signature.
They should be owned by root, readable only by root, and not
accessible to others.
Since they are readable only by root,
\fBssh-keysign\fP
must be set-uid root if host-based authentication is used.
.TP
.B /usr/local/etc/ssh_host_dsa_key-cert.pub
.TP
.B /usr/local/etc/ssh_host_ecdsa_key-cert.pub
.TP
.B /usr/local/etc/ssh_host_rsa_key-cert.pub
If these files exist they are assumed to contain public certificate
information corresponding with the private keys above.
.SH SEE ALSO
\fBssh\fP(1),
\fBssh-keygen\fP(1),
\fBssh_config\fP(5),
\fBsshd\fP(8)
.SH HISTORY
\fBssh-keysign\fP
first appeared in
OpenBSD 3.2 .
.SH AUTHORS
Markus Friedl
0707010002a819000081a400000000000000000000000150ff7427000009260000010000010031ffffffffffffffff0000002c00000000root/usr/local/share/man/man8/sftp-server.8 .TH SFTP-SERVER 8 "January 9 2010 " ""
.SH NAME
\fBsftp-server\fP
\- SFTP server subsystem
.SH SYNOPSIS
.br
\fBsftp-server\fP
[\fB\-ehR\fP]
[\fB\-f\fP \fIlog_facility\fP]
[\fB\-l\fP \fIlog_level\fP]
[\fB\-u\fP \fIumask\fP]
.SH DESCRIPTION
\fBsftp-server\fP
is a program that speaks the server side of SFTP protocol
to stdout and expects client requests from stdin.
\fBsftp-server\fP
is not intended to be called directly, but from
\fBsshd\fP(8)
using the
\fBSubsystem\fP
option.
Command-line flags to
\fBsftp-server\fP
should be specified in the
\fBSubsystem\fP
declaration.
See
\fBsshd_config\fP(5)
for more information.
Valid options are:
.TP
\fB\-e\fP
Causes
\fBsftp-server\fP
to print logging information to stderr instead of syslog for debugging.
.TP
\fB\-f\fP \fIlog_facility\fP
Specifies the facility code that is used when logging messages from
\fB.\fP
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
The default is AUTH.
.TP
\fB\-h\fP
Displays
\fBsftp-server\fP
usage information.
.TP
\fB\-l\fP \fIlog_level\fP
Specifies which messages will be logged by
\fB.\fP
The possible values are:
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
INFO and VERBOSE log transactions that
\fBsftp-server\fP
performs on behalf of the client.
DEBUG and DEBUG1 are equivalent.
DEBUG2 and DEBUG3 each specify higher levels of debugging output.
The default is ERROR.
.TP
\fB\-R\fP
Places this instance of
\fBsftp-server\fP
into a read-only mode.
Attempts to open files for writing, as well as other operations that change
the state of the filesystem, will be denied.
.TP
\fB\-u\fP \fIumask\fP
Sets an explicit
\fBumask\fP(2)
to be applied to newly-created files and directories, instead of the
user's default mask.
For logging to work,
\fBsftp-server\fP
must be able to access
\fI/dev/log\fP.
Use of
\fBsftp-server\fP
in a chroot configuration therefore requires that
\fBsyslogd\fP(8)
establish a logging socket inside the chroot directory.
.SH SEE ALSO
\fBsftp\fP(1),
\fBssh\fP(1),
\fBsshd_config\fP(5),
\fBsshd\fP(8)
S. Lehtinen and T. Ylonen, \fISSH File Transfer Protocol\fP, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material.
.SH HISTORY
\fBsftp-server\fP
first appeared in
OpenBSD 2.8 .
.SH AUTHORS
Markus Friedl
0707010002a80c000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000001e00000000root/usr/local/share/man/man1 0707010002a80f000081a400000000000000000000000150ff7427000011780000010000010031ffffffffffffffff0000002800000000root/usr/local/share/man/man1/ssh-add.1 .TH SSH-ADD 1 "October 18 2011 " ""
.SH NAME
\fBssh-add\fP
\- adds private key identities to the authentication agent
.SH SYNOPSIS
.br
\fBssh-add\fP
[\fB\-cDdkLlXx\fP]
[\fB\-t\fP \fIlife\fP]
[\fIfile ...\fP]
.br
\fBssh-add\fP
\fB\-s\fP \fIpkcs11\fP
.br
\fBssh-add\fP
\fB\-e\fP \fIpkcs11\fP
.SH DESCRIPTION
\fBssh-add\fP
adds private key identities to the authentication agent,
\fBssh-agent\fP(1).
When run without arguments, it adds the files
\fI~/.ssh/id_rsa\fP,
\fI~/.ssh/id_dsa\fP,
\fI~/.ssh/id_ecdsa\fP
and
\fI~/.ssh/identity\fP.
After loading a private key,
\fBssh-add\fP
will try to load corresponding certificate information from the
filename obtained by appending
\fI-cert.pub\fP
to the name of the private key file.
Alternative file names can be given on the command line.
If any file requires a passphrase,
\fBssh-add\fP
asks for the passphrase from the user.
The passphrase is read from the user's tty.
\fBssh-add\fP
retries the last passphrase if multiple identity files are given.
The authentication agent must be running and the
.IR SSH_AUTH_SOCK
environment variable must contain the name of its socket for
\fBssh-add\fP
to work.
The options are as follows:
.TP
\fB\-c\fP
Indicates that added identities should be subject to confirmation before
being used for authentication.
Confirmation is performed by the
.IR SSH_ASKPASS
program mentioned below.
Successful confirmation is signaled by a zero exit status from the
.IR SSH_ASKPASS
program, rather than text entered into the requester.
.TP
\fB\-D\fP
Deletes all identities from the agent.
.TP
\fB\-d\fP
Instead of adding identities, removes identities from the agent.
If
\fBssh-add\fP
has been run without arguments, the keys for the default identities will
be removed.
Otherwise, the argument list will be interpreted as a list of paths to
public key files and matching keys will be removed from the agent.
If no public key is found at a given path,
\fBssh-add\fP
will append
\fI\&.pub\fP
and retry.
.TP
\fB\-e\fP \fIpkcs11\fP
Remove keys provided by the PKCS#11 shared library
\fIpkcs11\fP.
.TP
\fB\-k\fP
When loading keys into the agent, load plain private keys only and skip
certificates.
.TP
\fB\-L\fP
Lists public key parameters of all identities currently represented
by the agent.
.TP
\fB\-l\fP
Lists fingerprints of all identities currently represented by the agent.
.TP
\fB\-s\fP \fIpkcs11\fP
Add keys provided by the PKCS#11 shared library
\fIpkcs11\fP.
.TP
\fB\-t\fP \fIlife\fP
Set a maximum lifetime when adding identities to an agent.
The lifetime may be specified in seconds or in a time format
specified in
\fBsshd_config\fP(5).
.TP
\fB\-X\fP
Unlock the agent.
.TP
\fB\-x\fP
Lock the agent with a password.
.SH ENVIRONMENT
.TP
.B "DISPLAY" and "SSH_ASKPASS"
If
\fBssh-add\fP
needs a passphrase, it will read the passphrase from the current
terminal if it was run from a terminal.
If
\fBssh-add\fP
does not have a terminal associated with it but
.IR DISPLAY
and
.IR SSH_ASKPASS
are set, it will execute the program specified by
.IR SSH_ASKPASS
and open an X11 window to read the passphrase.
This is particularly useful when calling
\fBssh-add\fP
from a
\fI\&.xsession\fP
or related script.
(Note that on some machines it
may be necessary to redirect the input from
\fI/dev/null\fP
to make this work.)
.TP
.B SSH_AUTH_SOCK
Identifies the path of a
UNIX-domain
socket used to communicate with the agent.
.SH FILES
.TP
.B ~/.ssh/identity
Contains the protocol version 1 RSA authentication identity of the user.
.TP
.B ~/.ssh/id_dsa
Contains the protocol version 2 DSA authentication identity of the user.
.TP
.B ~/.ssh/id_ecdsa
Contains the protocol version 2 ECDSA authentication identity of the user.
.TP
.B ~/.ssh/id_rsa
Contains the protocol version 2 RSA authentication identity of the user.
Identity files should not be readable by anyone but the user.
Note that
\fBssh-add\fP
ignores identity files if they are accessible by others.
.SH EXIT STATUS
Exit status is 0 on success, 1 if the specified command fails,
and 2 if
\fBssh-add\fP
is unable to contact the authentication agent.
.SH SEE ALSO
\fBssh\fP(1),
\fBssh-agent\fP(1),
\fBssh-keygen\fP(1),
\fBsshd\fP(8)
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
0707010002a813000081a400000000000000000000000150ff742700009ea30000010000010031ffffffffffffffff0000002400000000root/usr/local/share/man/man1/ssh.1 .TH SSH 1 "June 18 2012 " ""
.SH NAME
\fBssh\fP
\- OpenSSH SSH client (remote login program)
.SH SYNOPSIS
.br
\fBssh\fP
[\fB\-1246AaCfgKkMNnqsTtVvXxYy\fP]
[\fB\-b\fP \fIbind_address\fP]
[\fB\-c\fP \fIcipher_spec\fP]
[\fB\-D\fP[\fIbind_address\fP :]\fIport\fP]
[\fB\-e\fP \fIescape_char\fP]
[\fB\-F\fP \fIconfigfile\fP]
[\fB\-I\fP \fIpkcs11\fP]
[\fB\-i\fP \fIidentity_file\fP]
[\fB\-L\fP[\fIbind_address\fP :]\fIport\fP :\fIhost\fP :\fIhostport\fP]
[\fB\-l\fP \fIlogin_name\fP]
[\fB\-m\fP \fImac_spec\fP]
[\fB\-O\fP \fIctl_cmd\fP]
[\fB\-o\fP \fIoption\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-R\fP[\fIbind_address\fP :]\fIport\fP :\fIhost\fP :\fIhostport\fP]
[\fB\-S\fP \fIctl_path\fP]
[\fB\-W\fP \fIhost\fP :\fIport\fP]
[\fB\-w\fP \fIlocal_tun\fP[:\fIremote_tun\fP]
[\fIuser\fP@]\fIhostname\fP
[\fIcommand\fP]
.SH DESCRIPTION
\fBssh\fP
(SSH client) is a program for logging into a remote machine and for
executing commands on a remote machine.
It is intended to replace rlogin and rsh,
and provide secure encrypted communications between
two untrusted hosts over an insecure network.
X11 connections and arbitrary TCP ports
can also be forwarded over the secure channel.
\fBssh\fP
connects and logs into the specified
\fIhostname\fP
(with optional
\fIuser\fP
name).
The user must prove
his/her identity to the remote machine using one of several methods
depending on the protocol version used (see below).
If
\fIcommand\fP
is specified,
it is executed on the remote host instead of a login shell.
The options are as follows:
.TP
\fB\-1\fP
Forces
\fBssh\fP
to try protocol version 1 only.
.TP
\fB\-2\fP
Forces
\fBssh\fP
to try protocol version 2 only.
.TP
\fB\-4\fP
Forces
\fBssh\fP
to use IPv4 addresses only.
.TP
\fB\-6\fP
Forces
\fBssh\fP
to use IPv6 addresses only.
.TP
\fB\-A\fP
Enables forwarding of the authentication agent connection.
This can also be specified on a per-host basis in a configuration file.
Agent forwarding should be enabled with caution.
Users with the ability to bypass file permissions on the remote host
(for the agent's
UNIX-domain
socket) can access the local agent through the forwarded connection.
An attacker cannot obtain key material from the agent,
however they can perform operations on the keys that enable them to
authenticate using the identities loaded into the agent.
.TP
\fB\-a\fP
Disables forwarding of the authentication agent connection.
.TP
\fB\-b\fP \fIbind_address\fP
Use
\fIbind_address\fP
on the local machine as the source address
of the connection.
Only useful on systems with more than one address.
.TP
\fB\-C\fP
Requests compression of all data (including stdin, stdout, stderr, and
data for forwarded X11 and TCP connections).
The compression algorithm is the same used by
\fBgzip\fP(1),
and the
``level''
can be controlled by the
\fBCompressionLevel\fP
option for protocol version 1.
Compression is desirable on modem lines and other
slow connections, but will only slow down things on fast networks.
The default value can be set on a host-by-host basis in the
configuration files; see the
\fBCompression\fP
option.
.TP
\fB\-c\fP \fIcipher_spec\fP
Selects the cipher specification for encrypting the session.
Protocol version 1 allows specification of a single cipher.
The supported values are
``3des'',
``blowfish'',
and
``des''.
\fI3des\fP
(triple-des) is an encrypt-decrypt-encrypt triple with three different keys.
It is believed to be secure.
\fIblowfish\fP
is a fast block cipher; it appears very secure and is much faster than
\fI3des\fP.
\fIdes\fP
is only supported in the
\fBssh\fP
client for interoperability with legacy protocol 1 implementations
that do not support the
\fI3des\fP
cipher.
Its use is strongly discouraged due to cryptographic weaknesses.
The default is
``3des''.
For protocol version 2,
\fIcipher_spec\fP
is a comma-separated list of ciphers
listed in order of preference.
See the
\fBCiphers\fP
keyword in
\fBssh_config\fP(5)
for more information.
.TP
\fB\-D\fP [\fIbind_address\fP:] \fIport\fP
Specifies a local
``dynamic''
application-level port forwarding.
This works by allocating a socket to listen to
\fIport\fP
on the local side, optionally bound to the specified
\fIbind_address\fP.
Whenever a connection is made to this port, the
connection is forwarded over the secure channel, and the application
protocol is then used to determine where to connect to from the
remote machine.
Currently the SOCKS4 and SOCKS5 protocols are supported, and
\fBssh\fP
will act as a SOCKS server.
Only root can forward privileged ports.
Dynamic port forwardings can also be specified in the configuration file.
IPv6 addresses can be specified by enclosing the address in square brackets.
Only the superuser can forward privileged ports.
By default, the local port is bound in accordance with the
\fBGatewayPorts\fP
setting.
However, an explicit
\fIbind_address\fP
may be used to bind the connection to a specific address.
The
\fIbind_address\fP
of
``localhost''
indicates that the listening port be bound for local use only, while an
empty address or
`*'
indicates that the port should be available from all interfaces.
.TP
\fB\-e\fP \fIescape_char\fP
Sets the escape character for sessions with a pty (default:
`~' ) .
The escape character is only recognized at the beginning of a line.
The escape character followed by a dot
(`\&.')
closes the connection;
followed by control-Z suspends the connection;
and followed by itself sends the escape character once.
Setting the character to
``none''
disables any escapes and makes the session fully transparent.
.TP
\fB\-F\fP \fIconfigfile\fP
Specifies an alternative per-user configuration file.
If a configuration file is given on the command line,
the system-wide configuration file
(\fI/usr/local/etc/ssh_config\fP)
will be ignored.
The default for the per-user configuration file is
\fI~/.ssh/config\fP.
.TP
\fB\-f\fP
Requests
\fBssh\fP
to go to background just before command execution.
This is useful if
\fBssh\fP
is going to ask for passwords or passphrases, but the user
wants it in the background.
This implies
\fB\-n\fP.
The recommended way to start X11 programs at a remote site is with
something like
\fBssh -f host xterm\fP.
If the
\fBExitOnForwardFailure\fP
configuration option is set to
``yes'',
then a client started with
\fB\-f\fP
will wait for all remote port forwards to be successfully established
before placing itself in the background.
.TP
\fB\-g\fP
Allows remote hosts to connect to local forwarded ports.
.TP
\fB\-I\fP \fIpkcs11\fP
Specify the PKCS#11 shared library
\fBssh\fP
should use to communicate with a PKCS#11 token providing the user's
private RSA key.
.TP
\fB\-i\fP \fIidentity_file\fP
Selects a file from which the identity (private key) for
public key authentication is read.
The default is
\fI~/.ssh/identity\fP
for protocol version 1, and
\fI~/.ssh/id_dsa\fP,
\fI~/.ssh/id_ecdsa\fP
and
\fI~/.ssh/id_rsa\fP
for protocol version 2.
Identity files may also be specified on
a per-host basis in the configuration file.
It is possible to have multiple
\fB\-i\fP
options (and multiple identities specified in
configuration files).
\fBssh\fP
will also try to load certificate information from the filename obtained
by appending
\fI-cert.pub\fP
to identity filenames.
.TP
\fB\-K\fP
Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
credentials to the server.
.TP
\fB\-k\fP
Disables forwarding (delegation) of GSSAPI credentials to the server.
.TP
\fB\-L\fP [\fIbind_address\fP:] \fIport\fP:host:hostport
Specifies that the given port on the local (client) host is to be
forwarded to the given host and port on the remote side.
This works by allocating a socket to listen to
\fIport\fP
on the local side, optionally bound to the specified
\fIbind_address\fP.
Whenever a connection is made to this port, the
connection is forwarded over the secure channel, and a connection is
made to
\fIhost\fP
port
\fIhostport\fP
from the remote machine.
Port forwardings can also be specified in the configuration file.
IPv6 addresses can be specified by enclosing the address in square brackets.
Only the superuser can forward privileged ports.
By default, the local port is bound in accordance with the
\fBGatewayPorts\fP
setting.
However, an explicit
\fIbind_address\fP
may be used to bind the connection to a specific address.
The
\fIbind_address\fP
of
``localhost''
indicates that the listening port be bound for local use only, while an
empty address or
`*'
indicates that the port should be available from all interfaces.
.TP
\fB\-l\fP \fIlogin_name\fP
Specifies the user to log in as on the remote machine.
This also may be specified on a per-host basis in the configuration file.
.TP
\fB\-M\fP
Places the
\fBssh\fP
client into
``master''
mode for connection sharing.
Multiple
\fB\-M\fP
options places
\fBssh\fP
into
``master''
mode with confirmation required before slave connections are accepted.
Refer to the description of
\fBControlMaster\fP
in
\fBssh_config\fP(5)
for details.
.TP
\fB\-m\fP \fImac_spec\fP
Additionally, for protocol version 2 a comma-separated list of MAC
(message authentication code) algorithms can
be specified in order of preference.
See the
\fBMACs\fP
keyword for more information.
.TP
\fB\-N\fP
Do not execute a remote command.
This is useful for just forwarding ports
(protocol version 2 only).
.TP
\fB\-n\fP
Redirects stdin from
\fI/dev/null\fP
(actually, prevents reading from stdin).
This must be used when
\fBssh\fP
is run in the background.
A common trick is to use this to run X11 programs on a remote machine.
For example,
\fBssh -n shadows.cs.hut.fi emacs &\fP
will start an emacs on shadows.cs.hut.fi, and the X11
connection will be automatically forwarded over an encrypted channel.
The
\fBssh\fP
program will be put in the background.
(This does not work if
\fBssh\fP
needs to ask for a password or passphrase; see also the
\fB\-f\fP
option.)
.TP
\fB\-O\fP \fIctl_cmd\fP
Control an active connection multiplexing master process.
When the
\fB\-O\fP
option is specified, the
\fIctl_cmd\fP
argument is interpreted and passed to the master process.
Valid commands are:
``check''
(check that the master process is running),
``forward''
(request forwardings without command execution),
``cancel''
(cancel forwardings),
``exit''
(request the master to exit), and
``stop''
(request the master to stop accepting further multiplexing requests).
.TP
\fB\-o\fP \fIoption\fP
Can be used to give options in the format used in the configuration file.
This is useful for specifying options for which there is no separate
command-line flag.
For full details of the options listed below, and their possible values, see
\fBssh_config\fP(5).
.TP
AddressFamily
.TP
BatchMode
.TP
BindAddress
.TP
ChallengeResponseAuthentication
.TP
CheckHostIP
.TP
Cipher
.TP
Ciphers
.TP
ClearAllForwardings
.TP
Compression
.TP
CompressionLevel
.TP
ConnectionAttempts
.TP
ConnectTimeout
.TP
ControlMaster
.TP
ControlPath
.TP
ControlPersist
.TP
DynamicForward
.TP
EscapeChar
.TP
ExitOnForwardFailure
.TP
ForwardAgent
.TP
ForwardX11
.TP
ForwardX11Timeout
.TP
ForwardX11Trusted
.TP
GatewayPorts
.TP
GlobalKnownHostsFile
.TP
GSSAPIAuthentication
.TP
GSSAPIDelegateCredentials
.TP
HashKnownHosts
.TP
Host
.TP
HostbasedAuthentication
.TP
HostKeyAlgorithms
.TP
HostKeyAlias
.TP
HostName
.TP
IdentityFile
.TP
IdentitiesOnly
.TP
IPQoS
.TP
KbdInteractiveAuthentication
.TP
KbdInteractiveDevices
.TP
KexAlgorithms
.TP
LocalCommand
.TP
LocalForward
.TP
LogLevel
.TP
MACs
.TP
NoHostAuthenticationForLocalhost
.TP
NumberOfPasswordPrompts
.TP
PasswordAuthentication
.TP
PermitLocalCommand
.TP
PKCS11Provider
.TP
Port
.TP
PreferredAuthentications
.TP
Protocol
.TP
ProxyCommand
.TP
PubkeyAuthentication
.TP
RekeyLimit
.TP
RemoteForward
.TP
RequestTTY
.TP
RhostsRSAAuthentication
.TP
RSAAuthentication
.TP
SendEnv
.TP
ServerAliveInterval
.TP
ServerAliveCountMax
.TP
StrictHostKeyChecking
.TP
TCPKeepAlive
.TP
Tunnel
.TP
TunnelDevice
.TP
UsePrivilegedPort
.TP
User
.TP
UserKnownHostsFile
.TP
VerifyHostKeyDNS
.TP
VisualHostKey
.TP
XAuthLocation
.TP
\fB\-p\fP \fIport\fP
Port to connect to on the remote host.
This can be specified on a
per-host basis in the configuration file.
.TP
\fB\-q\fP
Quiet mode.
Causes most warning and diagnostic messages to be suppressed.
.TP
\fB\-R\fP [\fIbind_address\fP:] \fIport\fP:host:hostport
Specifies that the given port on the remote (server) host is to be
forwarded to the given host and port on the local side.
This works by allocating a socket to listen to
\fIport\fP
on the remote side, and whenever a connection is made to this port, the
connection is forwarded over the secure channel, and a connection is
made to
\fIhost\fP
port
\fIhostport\fP
from the local machine.
Port forwardings can also be specified in the configuration file.
Privileged ports can be forwarded only when
logging in as root on the remote machine.
IPv6 addresses can be specified by enclosing the address in square brackets.
By default, the listening socket on the server will be bound to the loopback
interface only.
This may be overridden by specifying a
\fIbind_address\fP.
An empty
\fIbind_address\fP,
or the address
`*',
indicates that the remote socket should listen on all interfaces.
Specifying a remote
\fIbind_address\fP
will only succeed if the server's
\fBGatewayPorts\fP
option is enabled (see
\fBsshd_config\fP(5)) .
If the
\fIport\fP
argument is
`0',
the listen port will be dynamically allocated on the server and reported
to the client at run time.
When used together with
\fB-O forward\fP
the allocated port will be printed to the standard output.
.TP
\fB\-S\fP \fIctl_path\fP
Specifies the location of a control socket for connection sharing,
or the string
``none''
to disable connection sharing.
Refer to the description of
\fBControlPath\fP
and
\fBControlMaster\fP
in
\fBssh_config\fP(5)
for details.
.TP
\fB\-s\fP
May be used to request invocation of a subsystem on the remote system.
Subsystems are a feature of the SSH2 protocol which facilitate the use
of SSH as a secure transport for other applications (eg.\&
\fBsftp\fP(1)) .
The subsystem is specified as the remote command.
.TP
\fB\-T\fP
Disable pseudo-tty allocation.
.TP
\fB\-t\fP
Force pseudo-tty allocation.
This can be used to execute arbitrary
screen-based programs on a remote machine, which can be very useful,
e.g. when implementing menu services.
Multiple
\fB\-t\fP
options force tty allocation, even if
\fBssh\fP
has no local tty.
.TP
\fB\-V\fP
Display the version number and exit.
.TP
\fB\-v\fP
Verbose mode.
Causes
\fBssh\fP
to print debugging messages about its progress.
This is helpful in
debugging connection, authentication, and configuration problems.
Multiple
\fB\-v\fP
options increase the verbosity.
The maximum is 3.
.TP
\fB\-W\fP \fIhost\fP :\fIport\fP
Requests that standard input and output on the client be forwarded to
\fIhost\fP
on
\fIport\fP
over the secure channel.
Implies
\fB\-N\fP,
\fB\-T\fP,
\fBExitOnForwardFailure\fP
and
\fBClearAllForwardings\fP.
Works with Protocol version 2 only.
.TP
\fB\-w\fP \fIlocal_tun\fP[:\fIremote_tun\fP]
Requests
tunnel
device forwarding with the specified
\fBtun\fP(4)
devices between the client
(\fIlocal_tun\fP)
and the server
(\fIremote_tun\fP.)
The devices may be specified by numerical ID or the keyword
``any'',
which uses the next available tunnel device.
If
\fIremote_tun\fP
is not specified, it defaults to
``any''.
See also the
\fBTunnel\fP
and
\fBTunnelDevice\fP
directives in
\fBssh_config\fP(5).
If the
\fBTunnel\fP
directive is unset, it is set to the default tunnel mode, which is
``point-to-point''.
.TP
\fB\-X\fP
Enables X11 forwarding.
This can also be specified on a per-host basis in a configuration file.
X11 forwarding should be enabled with caution.
Users with the ability to bypass file permissions on the remote host
(for the user's X authorization database)
can access the local X11 display through the forwarded connection.
An attacker may then be able to perform activities such as keystroke monitoring.
For this reason, X11 forwarding is subjected to X11 SECURITY extension
restrictions by default.
Please refer to the
\fBssh\fP
\fB\-Y\fP
option and the
\fBForwardX11Trusted\fP
directive in
\fBssh_config\fP(5)
for more information.
.TP
\fB\-x\fP
Disables X11 forwarding.
.TP
\fB\-Y\fP
Enables trusted X11 forwarding.
Trusted X11 forwardings are not subjected to the X11 SECURITY extension
controls.
.TP
\fB\-y\fP
Send log information using the
\fBsyslog\fP(3)
system module.
By default this information is sent to stderr.
\fBssh\fP
may additionally obtain configuration data from
a per-user configuration file and a system-wide configuration file.
The file format and configuration options are described in
\fBssh_config\fP(5).
.SH AUTHENTICATION
The OpenSSH SSH client supports SSH protocols 1 and 2.
The default is to use protocol 2 only,
though this can be changed via the
\fBProtocol\fP
option in
\fBssh_config\fP(5)
or the
\fB\-1\fP
and
\fB\-2\fP
options (see above).
Both protocols support similar authentication methods,
but protocol 2 is the default since
it provides additional mechanisms for confidentiality
(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
and integrity (hmac-md5, hmac-sha1,
hmac-sha2-256, hmac-sha2-512,
umac-64, hmac-ripemd160).
Protocol 1 lacks a strong mechanism for ensuring the
integrity of the connection.
The methods available for authentication are:
GSSAPI-based authentication,
host-based authentication,
public key authentication,
challenge-response authentication,
and password authentication.
Authentication methods are tried in the order specified above,
though protocol 2 has a configuration option to change the default order:
\fBPreferredAuthentications\fP.
Host-based authentication works as follows:
If the machine the user logs in from is listed in
\fI/etc/hosts.equiv\fP
or
\fI/usr/local/etc/shosts.equiv\fP
on the remote machine, and the user names are
the same on both sides, or if the files
\fI~/.rhosts\fP
or
\fI~/.shosts\fP
exist in the user's home directory on the
remote machine and contain a line containing the name of the client
machine and the name of the user on that machine, the user is
considered for login.
Additionally, the server
.IR must
be able to verify the client's
host key (see the description of
\fI/usr/local/etc/ssh_known_hosts\fP
and
\fI~/.ssh/known_hosts\fP,
below)
for login to be permitted.
This authentication method closes security holes due to IP
spoofing, DNS spoofing, and routing spoofing.
[Note to the administrator:
\fI/etc/hosts.equiv\fP,
\fI~/.rhosts\fP,
and the rlogin/rsh protocol in general, are inherently insecure and should be
disabled if security is desired.]
Public key authentication works as follows:
The scheme is based on public-key cryptography,
using cryptosystems
where encryption and decryption are done using separate keys,
and it is unfeasible to derive the decryption key from the encryption key.
The idea is that each user creates a public/private
key pair for authentication purposes.
The server knows the public key, and only the user knows the private key.
\fBssh\fP
implements public key authentication protocol automatically,
using one of the DSA, ECDSA or RSA algorithms.
Protocol 1 is restricted to using only RSA keys,
but protocol 2 may use any.
The
.B HISTORY
section of
\fBssl\fP(8)
contains a brief discussion of the DSA and RSA algorithms.
The file
\fI~/.ssh/authorized_keys\fP
lists the public keys that are permitted for logging in.
When the user logs in, the
\fBssh\fP
program tells the server which key pair it would like to use for
authentication.
The client proves that it has access to the private key
and the server checks that the corresponding public key
is authorized to accept the account.
The user creates his/her key pair by running
\fBssh-keygen\fP(1).
This stores the private key in
\fI~/.ssh/identity\fP
(protocol 1),
\fI~/.ssh/id_dsa\fP
(protocol 2 DSA),
\fI~/.ssh/id_ecdsa\fP
(protocol 2 ECDSA),
or
\fI~/.ssh/id_rsa\fP
(protocol 2 RSA)
and stores the public key in
\fI~/.ssh/identity.pub\fP
(protocol 1),
\fI~/.ssh/id_dsa.pub\fP
(protocol 2 DSA),
\fI~/.ssh/id_ecdsa.pub\fP
(protocol 2 ECDSA),
or
\fI~/.ssh/id_rsa.pub\fP
(protocol 2 RSA)
in the user's home directory.
The user should then copy the public key
to
\fI~/.ssh/authorized_keys\fP
in his/her home directory on the remote machine.
The
\fIauthorized_keys\fP
file corresponds to the conventional
\fI~/.rhosts\fP
file, and has one key
per line, though the lines can be very long.
After this, the user can log in without giving the password.
A variation on public key authentication
is available in the form of certificate authentication:
instead of a set of public/private keys,
signed certificates are used.
This has the advantage that a single trusted certification authority
can be used in place of many public/private keys.
See the
.B CERTIFICATES
section of
\fBssh-keygen\fP(1)
for more information.
The most convenient way to use public key or certificate authentication
may be with an authentication agent.
See
\fBssh-agent\fP(1)
for more information.
Challenge-response authentication works as follows:
The server sends an arbitrary
Qq challenge
text, and prompts for a response.
Protocol 2 allows multiple challenges and responses;
protocol 1 is restricted to just one challenge/response.
Examples of challenge-response authentication include
BSD Authentication (see
\fBlogin.conf\fP(5))
and PAM (some non-OpenBSD systems).
Finally, if other authentication methods fail,
\fBssh\fP
prompts the user for a password.
The password is sent to the remote
host for checking; however, since all communications are encrypted,
the password cannot be seen by someone listening on the network.
\fBssh\fP
automatically maintains and checks a database containing
identification for all hosts it has ever been used with.
Host keys are stored in
\fI~/.ssh/known_hosts\fP
in the user's home directory.
Additionally, the file
\fI/usr/local/etc/ssh_known_hosts\fP
is automatically checked for known hosts.
Any new hosts are automatically added to the user's file.
If a host's identification ever changes,
\fBssh\fP
warns about this and disables password authentication to prevent
server spoofing or man-in-the-middle attacks,
which could otherwise be used to circumvent the encryption.
The
\fBStrictHostKeyChecking\fP
option can be used to control logins to machines whose
host key is not known or has changed.
When the user's identity has been accepted by the server, the server
either executes the given command, or logs into the machine and gives
the user a normal shell on the remote machine.
All communication with
the remote command or shell will be automatically encrypted.
If a pseudo-terminal has been allocated (normal login session), the
user may use the escape characters noted below.
If no pseudo-tty has been allocated,
the session is transparent and can be used to reliably transfer binary data.
On most systems, setting the escape character to
``none''
will also make the session transparent even if a tty is used.
The session terminates when the command or shell on the remote
machine exits and all X11 and TCP connections have been closed.
.SH ESCAPE CHARACTERS
When a pseudo-terminal has been requested,
\fBssh\fP
supports a number of functions through the use of an escape character.
A single tilde character can be sent as
\fB~~\fP
or by following the tilde by a character other than those described below.
The escape character must always follow a newline to be interpreted as
special.
The escape character can be changed in configuration files using the
\fBEscapeChar\fP
configuration directive or on the command line by the
\fB\-e\fP
option.
The supported escapes (assuming the default
`~' )
are:
.TP
\fB~.\fP
Disconnect.
.TP
\fB~^Z\fP
Background
\fB.\fP
.TP
\fB~#\fP
List forwarded connections.
.TP
\fB~&\fP
Background
\fBssh\fP
at logout when waiting for forwarded connection / X11 sessions to terminate.
.TP
\fB~?\fP
Display a list of escape characters.
.TP
\fB~B\fP
Send a BREAK to the remote system
(only useful for SSH protocol version 2 and if the peer supports it).
.TP
\fB~C\fP
Open command line.
Currently this allows the addition of port forwardings using the
\fB\-L\fP,
\fB\-R\fP
and
\fB\-D\fP
options (see above).
It also allows the cancellation of existing port-forwardings
with
\fB\-KL\fP[\fIbind_address\fP:]\fIport\fP
for local,
\fB\-KR\fP[\fIbind_address\fP:]\fIport\fP
for remote and
\fB\-KD\fP[\fIbind_address\fP:]\fIport\fP
for dynamic port-forwardings.
\fB!\& Ns \fIcommand\fP\fP
allows the user to execute a local command if the
\fBPermitLocalCommand\fP
option is enabled in
\fBssh_config\fP(5).
Basic help is available, using the
\fB\-h\fP
option.
.TP
\fB~R\fP
Request rekeying of the connection
(only useful for SSH protocol version 2 and if the peer supports it).
.SH TCP FORWARDING
Forwarding of arbitrary TCP connections over the secure channel can
be specified either on the command line or in a configuration file.
One possible application of TCP forwarding is a secure connection to a
mail server; another is going through firewalls.
In the example below, we look at encrypting communication between
an IRC client and server, even though the IRC server does not directly
support encrypted communications.
This works as follows:
the user connects to the remote host using
\fB,\fP
specifying a port to be used to forward connections
to the remote server.
After that it is possible to start the service which is to be encrypted
on the client machine,
connecting to the same local port,
and
\fBssh\fP
will encrypt and forward the connection.
The following example tunnels an IRC session from client machine
``127.0.0.1''
(localhost)
to remote server
``server.example.com :''
$ ssh -f -L 1234:localhost:6667 server.example.com sleep 10
.br
$ irc -c '#users' -p 1234 pinky 127.0.0.1
.br
This tunnels a connection to IRC server
``server.example.com'',
joining channel
``#users'',
nickname
``pinky'',
using port 1234.
It doesn't matter which port is used,
as long as it's greater than 1023
(remember, only root can open sockets on privileged ports)
and doesn't conflict with any ports already in use.
The connection is forwarded to port 6667 on the remote server,
since that's the standard port for IRC services.
The
\fB\-f\fP
option backgrounds
\fBssh\fP
and the remote command
``sleep 10''
is specified to allow an amount of time
(10 seconds, in the example)
to start the service which is to be tunnelled.
If no connections are made within the time specified,
\fBssh\fP
will exit.
.SH X11 FORWARDING
If the
\fBForwardX11\fP
variable is set to
``yes''
(or see the description of the
\fB\-X\fP,
\fB\-x\fP,
and
\fB\-Y\fP
options above)
and the user is using X11 (the
.IR DISPLAY
environment variable is set), the connection to the X11 display is
automatically forwarded to the remote side in such a way that any X11
programs started from the shell (or command) will go through the
encrypted channel, and the connection to the real X server will be made
from the local machine.
The user should not manually set
.IR DISPLAY .
Forwarding of X11 connections can be
configured on the command line or in configuration files.
The
.IR DISPLAY
value set by
\fBssh\fP
will point to the server machine, but with a display number greater than zero.
This is normal, and happens because
\fBssh\fP
creates a
``proxy''
X server on the server machine for forwarding the
connections over the encrypted channel.
\fBssh\fP
will also automatically set up Xauthority data on the server machine.
For this purpose, it will generate a random authorization cookie,
store it in Xauthority on the server, and verify that any forwarded
connections carry this cookie and replace it by the real cookie when
the connection is opened.
The real authentication cookie is never
sent to the server machine (and no cookies are sent in the plain).
If the
\fBForwardAgent\fP
variable is set to
``yes''
(or see the description of the
\fB\-A\fP
and
\fB\-a\fP
options above) and
the user is using an authentication agent, the connection to the agent
is automatically forwarded to the remote side.
.SH VERIFYING HOST KEYS
When connecting to a server for the first time,
a fingerprint of the server's public key is presented to the user
(unless the option
\fBStrictHostKeyChecking\fP
has been disabled).
Fingerprints can be determined using
\fBssh-keygen\fP(1):
Dl $ ssh-keygen -l -f /usr/local/etc/ssh_host_rsa_key
If the fingerprint is already known, it can be matched
and the key can be accepted or rejected.
Because of the difficulty of comparing host keys
just by looking at hex strings,
there is also support to compare host keys visually,
using
.IR random art .
By setting the
\fBVisualHostKey\fP
option to
``yes'',
a small ASCII graphic gets displayed on every login to a server, no matter
if the session itself is interactive or not.
By learning the pattern a known server produces, a user can easily
find out that the host key has changed when a completely different pattern
is displayed.
Because these patterns are not unambiguous however, a pattern that looks
similar to the pattern remembered only gives a good probability that the
host key is the same, not guaranteed proof.
To get a listing of the fingerprints along with their random art for
all known hosts, the following command line can be used:
Dl $ ssh-keygen -lv -f ~/.ssh/known_hosts
If the fingerprint is unknown,
an alternative method of verification is available:
SSH fingerprints verified by DNS.
An additional resource record (RR),
SSHFP,
is added to a zonefile
and the connecting client is able to match the fingerprint
with that of the key presented.
In this example, we are connecting a client to a server,
``host.example.com''.
The SSHFP resource records should first be added to the zonefile for
host.example.com:
$ ssh-keygen -r host.example.com.
.br
The output lines will have to be added to the zonefile.
To check that the zone is answering fingerprint queries:
Dl $ dig -t SSHFP host.example.com
Finally the client connects:
$ ssh -o "VerifyHostKeyDNS ask" host.example.com
.br
[...]
.br
Matching host key fingerprint found in DNS.
.br
Are you sure you want to continue connecting (yes/no)?
.br
See the
\fBVerifyHostKeyDNS\fP
option in
\fBssh_config\fP(5)
for more information.
.SH SSH-BASED VIRTUAL PRIVATE NETWORKS
\fBssh\fP
contains support for Virtual Private Network (VPN) tunnelling
using the
\fBtun\fP(4)
network pseudo-device,
allowing two networks to be joined securely.
The
\fBsshd_config\fP(5)
configuration option
\fBPermitTunnel\fP
controls whether the server supports this,
and at what level (layer 2 or 3 traffic).
The following example would connect client network 10.0.50.0/24
with remote network 10.0.99.0/24 using a point-to-point connection
from 10.1.1.1 to 10.1.1.2,
provided that the SSH server running on the gateway to the remote network,
at 192.168.1.15, allows it.
On the client:
# ssh -f -w 0:1 192.168.1.15 true
.br
# ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
.br
# route add 10.0.99.0/24 10.1.1.2
.br
On the server:
# ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
.br
# route add 10.0.50.0/24 10.1.1.1
.br
Client access may be more finely tuned via the
\fI/root/.ssh/authorized_keys\fP
file (see below) and the
\fBPermitRootLogin\fP
server option.
The following entry would permit connections on
\fBtun\fP(4)
device 1 from user
``jane''
and on tun device 2 from user
``john'',
if
\fBPermitRootLogin\fP
is set to
``forced-commands-only :''
tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane
.br
tunnel="2",command="sh /etc/netstart tun2" ssh-rsa ... john
.br
Since an SSH-based setup entails a fair amount of overhead,
it may be more suited to temporary setups,
such as for wireless VPNs.
More permanent VPNs are better provided by tools such as
\fBipsecctl\fP(8)
and
\fBisakmpd\fP(8).
.SH ENVIRONMENT
\fBssh\fP
will normally set the following environment variables:
.TP
.B DISPLAY
The
.IR DISPLAY
variable indicates the location of the X11 server.
It is automatically set by
\fBssh\fP
to point to a value of the form
``hostname:n'',
where
``hostname''
indicates the host where the shell runs, and
`n'
is an integer \*(Ge 1.
\fBssh\fP
uses this special value to forward X11 connections over the secure
channel.
The user should normally not set
.IR DISPLAY
explicitly, as that
will render the X11 connection insecure (and will require the user to
manually copy any required authorization cookies).
.TP
.B HOME
Set to the path of the user's home directory.
.TP
.B LOGNAME
Synonym for
.IR USER ;
set for compatibility with systems that use this variable.
.TP
.B MAIL
Set to the path of the user's mailbox.
.TP
.B PATH
Set to the default
.IR PATH ,
as specified when compiling
\fB.\fP
.TP
.B SSH_ASKPASS
If
\fBssh\fP
needs a passphrase, it will read the passphrase from the current
terminal if it was run from a terminal.
If
\fBssh\fP
does not have a terminal associated with it but
.IR DISPLAY
and
.IR SSH_ASKPASS
are set, it will execute the program specified by
.IR SSH_ASKPASS
and open an X11 window to read the passphrase.
This is particularly useful when calling
\fBssh\fP
from a
\fI\&.xsession\fP
or related script.
(Note that on some machines it
may be necessary to redirect the input from
\fI/dev/null\fP
to make this work.)
.TP
.B SSH_AUTH_SOCK
Identifies the path of a
UNIX-domain
socket used to communicate with the agent.
.TP
.B SSH_CONNECTION
Identifies the client and server ends of the connection.
The variable contains
four space-separated values: client IP address, client port number,
server IP address, and server port number.
.TP
.B SSH_ORIGINAL_COMMAND
This variable contains the original command line if a forced command
is executed.
It can be used to extract the original arguments.
.TP
.B SSH_TTY
This is set to the name of the tty (path to the device) associated
with the current shell or command.
If the current session has no tty,
this variable is not set.
.TP
.B TZ
This variable is set to indicate the present time zone if it
was set when the daemon was started (i.e. the daemon passes the value
on to new connections).
.TP
.B USER
Set to the name of the user logging in.
Additionally,
\fBssh\fP
reads
\fI~/.ssh/environment\fP,
and adds lines of the format
``VARNAME=value''
to the environment if the file exists and users are allowed to
change their environment.
For more information, see the
\fBPermitUserEnvironment\fP
option in
\fBsshd_config\fP(5).
.SH FILES
.TP
.B ~/.rhosts
This file is used for host-based authentication (see above).
On some machines this file may need to be
world-readable if the user's home directory is on an NFS partition,
because
\fBsshd\fP(8)
reads it as root.
Additionally, this file must be owned by the user,
and must not have write permissions for anyone else.
The recommended
permission for most machines is read/write for the user, and not
accessible by others.
.TP
.B ~/.shosts
This file is used in exactly the same way as
\fI\&.rhosts\fP,
but allows host-based authentication without permitting login with
rlogin/rsh.
.TP
.B ~/.ssh/
This directory is the default location for all user-specific configuration
and authentication information.
There is no general requirement to keep the entire contents of this directory
secret, but the recommended permissions are read/write/execute for the user,
and not accessible by others.
.TP
.B ~/.ssh/authorized_keys
Lists the public keys (DSA/ECDSA/RSA) that can be used for logging in as
this user.
The format of this file is described in the
\fBsshd\fP(8)
manual page.
This file is not highly sensitive, but the recommended
permissions are read/write for the user, and not accessible by others.
.TP
.B ~/.ssh/config
This is the per-user configuration file.
The file format and configuration options are described in
\fBssh_config\fP(5).
Because of the potential for abuse, this file must have strict permissions:
read/write for the user, and not accessible by others.
.TP
.B ~/.ssh/environment
Contains additional definitions for environment variables; see
.B ENVIRONMENT ,
above.
.TP
.B ~/.ssh/identity
.TP
.B ~/.ssh/id_dsa
.TP
.B ~/.ssh/id_ecdsa
.TP
.B ~/.ssh/id_rsa
Contains the private key for authentication.
These files
contain sensitive data and should be readable by the user but not
accessible by others (read/write/execute).
\fBssh\fP
will simply ignore a private key file if it is accessible by others.
It is possible to specify a passphrase when
generating the key which will be used to encrypt the
sensitive part of this file using 3DES.
.TP
.B ~/.ssh/identity.pub
.TP
.B ~/.ssh/id_dsa.pub
.TP
.B ~/.ssh/id_ecdsa.pub
.TP
.B ~/.ssh/id_rsa.pub
Contains the public key for authentication.
These files are not
sensitive and can (but need not) be readable by anyone.
.TP
.B ~/.ssh/known_hosts
Contains a list of host keys for all hosts the user has logged into
that are not already in the systemwide list of known host keys.
See
\fBsshd\fP(8)
for further details of the format of this file.
.TP
.B ~/.ssh/rc
Commands in this file are executed by
\fBssh\fP
when the user logs in, just before the user's shell (or command) is
started.
See the
\fBsshd\fP(8)
manual page for more information.
.TP
.B /etc/hosts.equiv
This file is for host-based authentication (see above).
It should only be writable by root.
.TP
.B /usr/local/etc/shosts.equiv
This file is used in exactly the same way as
\fIhosts.equiv\fP,
but allows host-based authentication without permitting login with
rlogin/rsh.
.TP
.B /usr/local/etc/ssh_config
Systemwide configuration file.
The file format and configuration options are described in
\fBssh_config\fP(5).
.TP
.B /usr/local/etc/ssh_host_key
.TP
.B /usr/local/etc/ssh_host_dsa_key
.TP
.B /usr/local/etc/ssh_host_ecdsa_key
.TP
.B /usr/local/etc/ssh_host_rsa_key
These files contain the private parts of the host keys
and are used for host-based authentication.
If protocol version 1 is used,
\fBssh\fP
must be setuid root, since the host key is readable only by root.
For protocol version 2,
\fBssh\fP
uses
\fBssh-keysign\fP(8)
to access the host keys,
eliminating the requirement that
\fBssh\fP
be setuid root when host-based authentication is used.
By default
\fBssh\fP
is not setuid root.
.TP
.B /usr/local/etc/ssh_known_hosts
Systemwide list of known host keys.
This file should be prepared by the
system administrator to contain the public host keys of all machines in the
organization.
It should be world-readable.
See
\fBsshd\fP(8)
for further details of the format of this file.
.TP
.B /usr/local/etc/sshrc
Commands in this file are executed by
\fBssh\fP
when the user logs in, just before the user's shell (or command) is started.
See the
\fBsshd\fP(8)
manual page for more information.
.SH EXIT STATUS
\fBssh\fP
exits with the exit status of the remote command or with 255
if an error occurred.
.SH SEE ALSO
\fBscp\fP(1),
\fBsftp\fP(1),
\fBssh-add\fP(1),
\fBssh-agent\fP(1),
\fBssh-keygen\fP(1),
\fBssh-keyscan\fP(1),
\fBtun\fP(4),
\fBhosts.equiv\fP(5),
\fBssh_config\fP(5),
\fBssh-keysign\fP(8),
\fBsshd\fP(8)
\fIThe Secure Shell (SSH) Protocol Assigned Numbers\fP, RFC 4250, 2006.
\fIThe Secure Shell (SSH) Protocol Architecture\fP, RFC 4251, 2006.
\fIThe Secure Shell (SSH) Authentication Protocol\fP, RFC 4252, 2006.
\fIThe Secure Shell (SSH) Transport Layer Protocol\fP, RFC 4253, 2006.
\fIThe Secure Shell (SSH) Connection Protocol\fP, RFC 4254, 2006.
\fIUsing DNS to Securely Publish Secure Shell (SSH) Key Fingerprints\fP, RFC 4255, 2006.
\fIGeneric Message Exchange Authentication for the Secure Shell Protocol (SSH)\fP, RFC 4256, 2006.
\fIThe Secure Shell (SSH) Session Channel Break Extension\fP, RFC 4335, 2006.
\fIThe Secure Shell (SSH) Transport Layer Encryption Modes\fP, RFC 4344, 2006.
\fIImproved Arcfour Modes for the Secure Shell (SSH) Transport Layer Protocol\fP, RFC 4345, 2006.
\fIDiffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol\fP, RFC 4419, 2006.
\fIThe Secure Shell (SSH) Public Key File Format\fP, RFC 4716, 2006.
\fIElliptic Curve Algorithm Integration in the Secure Shell Transport Layer\fP, RFC 5656, 2009.
D. Song and A. Perrig, \fIHash Visualization: a New Technique to improve Real-World Security\fP, 1999, "International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)".
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
0707010002a80e000081a400000000000000000000000150ff742700002f430000010000010031ffffffffffffffff0000002500000000root/usr/local/share/man/man1/sftp.1 .TH SFTP 1 "September 5 2011 " ""
.SH NAME
\fBsftp\fP
\- secure file transfer program
.SH SYNOPSIS
.br
\fBsftp\fP
[\fB\-1246Cpqrv\fP]
[\fB\-B\fP \fIbuffer_size\fP]
[\fB\-b\fP \fIbatchfile\fP]
[\fB\-c\fP \fIcipher\fP]
[\fB\-D\fP \fIsftp_server_path\fP]
[\fB\-F\fP \fIssh_config\fP]
[\fB\-i\fP \fIidentity_file\fP]
[\fB\-l\fP \fIlimit\fP]
[\fB\-o\fP \fIssh_option\fP]
[\fB\-P\fP \fIport\fP]
[\fB\-R\fP \fInum_requests\fP]
[\fB\-S\fP \fIprogram\fP]
[\fB\-s\fP \fIsubsystem\fP | \fIsftp_server\fP]
\fIhost\fP
.br
\fBsftp\fP
[\fIuser\fP@]
\fIhost\fP[:\fIfile ...\fP]
.br
\fBsftp\fP
[\fIuser\fP@]
\fIhost\fP[:\fIdir\fP[\fI/\fP]]
.br
\fBsftp\fP
\fB\-b\fP \fIbatchfile\fP
[\fIuser\fP@]\fIhost\fP
.SH DESCRIPTION
\fBsftp\fP
is an interactive file transfer program, similar to
\fBftp\fP(1),
which performs all operations over an encrypted
\fBssh\fP(1)
transport.
It may also use many features of ssh, such as public key authentication and
compression.
\fBsftp\fP
connects and logs into the specified
\fIhost\fP,
then enters an interactive command mode.
The second usage format will retrieve files automatically if a non-interactive
authentication method is used; otherwise it will do so after
successful interactive authentication.
The third usage format allows
\fBsftp\fP
to start in a remote directory.
The final usage format allows for automated sessions using the
\fB\-b\fP
option.
In such cases, it is necessary to configure non-interactive authentication
to obviate the need to enter a password at connection time (see
\fBsshd\fP(8)
and
\fBssh-keygen\fP(1)
for details).
Since some usage formats use colon characters to delimit host names from path
names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity.
The options are as follows:
.TP
\fB\-1\fP
Specify the use of protocol version 1.
.TP
\fB\-2\fP
Specify the use of protocol version 2.
.TP
\fB\-4\fP
Forces
\fBsftp\fP
to use IPv4 addresses only.
.TP
\fB\-6\fP
Forces
\fBsftp\fP
to use IPv6 addresses only.
.TP
\fB\-B\fP \fIbuffer_size\fP
Specify the size of the buffer that
\fBsftp\fP
uses when transferring files.
Larger buffers require fewer round trips at the cost of higher
memory consumption.
The default is 32768 bytes.
.TP
\fB\-b\fP \fIbatchfile\fP
Batch mode reads a series of commands from an input
\fIbatchfile\fP
instead of
.IR stdin .
Since it lacks user interaction it should be used in conjunction with
non-interactive authentication.
A
\fIbatchfile\fP
of
`\-'
may be used to indicate standard input.
\fBsftp\fP
will abort if any of the following
commands fail:
\fBget\fP, \fBput\fP, \fBrename\fP, \fBln\fP,
\fBrm\fP, \fBmkdir\fP, \fBchdir\fP, \fBls\fP,
\fBlchdir\fP, \fBchmod\fP, \fBchown\fP,
\fBchgrp\fP, \fBlpwd\fP, \fBdf\fP, \fBsymlink\fP,
and
\fBlmkdir\fP.
Termination on error can be suppressed on a command by command basis by
prefixing the command with a
`\-'
character (for example,
\fB-rm /tmp/blah* )\fP.
.TP
\fB\-C\fP
Enables compression (via ssh's
\fB\-C\fP
flag).
.TP
\fB\-c\fP \fIcipher\fP
Selects the cipher to use for encrypting the data transfers.
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-D\fP \fIsftp_server_path\fP
Connect directly to a local sftp server
(rather than via
\fBssh\fP(1)) .
This option may be useful in debugging the client and server.
.TP
\fB\-F\fP \fIssh_config\fP
Specifies an alternative
per-user configuration file for
\fBssh\fP(1).
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-i\fP \fIidentity_file\fP
Selects the file from which the identity (private key) for public key
authentication is read.
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-l\fP \fIlimit\fP
Limits the used bandwidth, specified in Kbit/s.
.TP
\fB\-o\fP \fIssh_option\fP
Can be used to pass options to
\fBssh\fP
in the format used in
\fBssh_config\fP(5).
This is useful for specifying options
for which there is no separate
\fBsftp\fP
command-line flag.
For example, to specify an alternate port use:
\fBsftp -oPort=24\fP.
For full details of the options listed below, and their possible values, see
\fBssh_config\fP(5).
.TP
AddressFamily
.TP
BatchMode
.TP
BindAddress
.TP
ChallengeResponseAuthentication
.TP
CheckHostIP
.TP
Cipher
.TP
Ciphers
.TP
Compression
.TP
CompressionLevel
.TP
ConnectionAttempts
.TP
ConnectTimeout
.TP
ControlMaster
.TP
ControlPath
.TP
ControlPersist
.TP
GlobalKnownHostsFile
.TP
GSSAPIAuthentication
.TP
GSSAPIDelegateCredentials
.TP
HashKnownHosts
.TP
Host
.TP
HostbasedAuthentication
.TP
HostKeyAlgorithms
.TP
HostKeyAlias
.TP
HostName
.TP
IdentityFile
.TP
IdentitiesOnly
.TP
IPQoS
.TP
KbdInteractiveAuthentication
.TP
KbdInteractiveDevices
.TP
KexAlgorithms
.TP
LogLevel
.TP
MACs
.TP
NoHostAuthenticationForLocalhost
.TP
NumberOfPasswordPrompts
.TP
PasswordAuthentication
.TP
PKCS11Provider
.TP
Port
.TP
PreferredAuthentications
.TP
Protocol
.TP
ProxyCommand
.TP
PubkeyAuthentication
.TP
RekeyLimit
.TP
RhostsRSAAuthentication
.TP
RSAAuthentication
.TP
SendEnv
.TP
ServerAliveInterval
.TP
ServerAliveCountMax
.TP
StrictHostKeyChecking
.TP
TCPKeepAlive
.TP
UsePrivilegedPort
.TP
User
.TP
UserKnownHostsFile
.TP
VerifyHostKeyDNS
.TP
\fB\-P\fP \fIport\fP
Specifies the port to connect to on the remote host.
.TP
\fB\-p\fP
Preserves modification times, access times, and modes from the
original files transferred.
.TP
\fB\-q\fP
Quiet mode: disables the progress meter as well as warning and
diagnostic messages from
\fBssh\fP(1).
.TP
\fB\-R\fP \fInum_requests\fP
Specify how many requests may be outstanding at any one time.
Increasing this may slightly improve file transfer speed
but will increase memory usage.
The default is 64 outstanding requests.
.TP
\fB\-r\fP
Recursively copy entire directories when uploading and downloading.
Note that
\fBsftp\fP
does not follow symbolic links encountered in the tree traversal.
.TP
\fB\-S\fP \fIprogram\fP
Name of the
\fIprogram\fP
to use for the encrypted connection.
The program must understand
\fBssh\fP(1)
options.
.TP
\fB\-s\fP \fIsubsystem\fP | \fIsftp_server\fP
Specifies the SSH2 subsystem or the path for an sftp server
on the remote host.
A path is useful for using
\fBsftp\fP
over protocol version 1, or when the remote
\fBsshd\fP(8)
does not have an sftp subsystem configured.
.TP
\fB\-v\fP
Raise logging level.
This option is also passed to ssh.
.SH INTERACTIVE COMMANDS
Once in interactive mode,
\fBsftp\fP
understands a set of commands similar to those of
\fBftp\fP(1).
Commands are case insensitive.
Pathnames that contain spaces must be enclosed in quotes.
Any special characters contained within pathnames that are recognized by
\fBglob\fP(3)
must be escaped with backslashes
(`\e'.)
.TP
\fBbye\fP
Quit
\fBsftp\fP.
.TP
\fBcd \fIpath\fP\fP
Change remote directory to
\fIpath\fP.
.TP
\fBchgrp \fIgrp\fP \fIpath\fP\fP
Change group of file
\fIpath\fP
to
\fIgrp\fP.
\fIpath\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
\fIgrp\fP
must be a numeric GID.
.TP
\fBchmod \fImode\fP \fIpath\fP\fP
Change permissions of file
\fIpath\fP
to
\fImode\fP.
\fIpath\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
.TP
\fBchown \fIown\fP \fIpath\fP\fP
Change owner of file
\fIpath\fP
to
\fIown\fP.
\fIpath\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
\fIown\fP
must be a numeric UID.
.TP
\fBdf\fP [\fB\-hi\fP] [\fIpath\fP]
Display usage information for the filesystem holding the current directory
(or
\fIpath\fP
if specified).
If the
\fB\-h\fP
flag is specified, the capacity information will be displayed using
"human-readable" suffixes.
The
\fB\-i\fP
flag requests display of inode information in addition to capacity information.
This command is only supported on servers that implement the
``statvfs@openssh.com''
extension.
.TP
\fBexit\fP
Quit
\fBsftp\fP.
.TP
\fBget\fP [\fB\-Ppr\fP] \fIremote-path\fP [\fIlocal-path\fP]
Retrieve the
\fIremote-path\fP
and store it on the local machine.
If the local
path name is not specified, it is given the same name it has on the
remote machine.
\fIremote-path\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
If it does and
\fIlocal-path\fP
is specified, then
\fIlocal-path\fP
must specify a directory.
If either the
\fB\-P\fP
or
\fB\-p\fP
flag is specified, then full file permissions and access times are
copied too.
If the
\fB\-r\fP
flag is specified then directories will be copied recursively.
Note that
\fBsftp\fP
does not follow symbolic links when performing recursive transfers.
.TP
\fBhelp\fP
Display help text.
.TP
\fBlcd \fIpath\fP\fP
Change local directory to
\fIpath\fP.
.TP
\fBlls [\fIls-options\fP [\fIpath]]\fP\fP
Display local directory listing of either
\fIpath\fP
or current directory if
\fIpath\fP
is not specified.
\fIls-options\fP
may contain any flags supported by the local system's
\fBls\fP(1)
command.
\fIpath\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
.TP
\fBlmkdir \fIpath\fP\fP
Create local directory specified by
\fIpath\fP.
.TP
\fBln\fP [\fB\-s\fP] \fIoldpath\fP \fInewpath\fP
Create a link from
\fIoldpath\fP
to
\fInewpath\fP.
If the
\fB\-s\fP
flag is specified the created link is a symbolic link, otherwise it is
a hard link.
.TP
\fBlpwd\fP
Print local working directory.
.TP
\fBls\fP [\fB\-1afhlnrSt\fP] [\fIpath\fP]
Display a remote directory listing of either
\fIpath\fP
or the current directory if
\fIpath\fP
is not specified.
\fIpath\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
The following flags are recognized and alter the behaviour of
\fBls\fP
accordingly:
.TP
\fB\-1\fP
Produce single columnar output.
.TP
\fB\-a\fP
List files beginning with a dot
(`\&.'.)
.TP
\fB\-f\fP
Do not sort the listing.
The default sort order is lexicographical.
.TP
\fB\-h\fP
When used with a long format option, use unit suffixes: Byte, Kilobyte,
Megabyte, Gigabyte, Terabyte, Petabyte, and Exabyte in order to reduce
the number of digits to four or fewer using powers of 2 for sizes (K=1024,
M=1048576, etc.).
.TP
\fB\-l\fP
Display additional details including permissions
and ownership information.
.TP
\fB\-n\fP
Produce a long listing with user and group information presented
numerically.
.TP
\fB\-r\fP
Reverse the sort order of the listing.
.TP
\fB\-S\fP
Sort the listing by file size.
.TP
\fB\-t\fP
Sort the listing by last modification time.
.TP
\fBlumask \fIumask\fP\fP
Set local umask to
\fIumask\fP.
.TP
\fBmkdir \fIpath\fP\fP
Create remote directory specified by
\fIpath\fP.
.TP
\fBprogress\fP
Toggle display of progress meter.
.TP
\fBput\fP [\fB\-Ppr\fP] \fIlocal-path\fP [\fIremote-path\fP]
Upload
\fIlocal-path\fP
and store it on the remote machine.
If the remote path name is not specified, it is given the same name it has
on the local machine.
\fIlocal-path\fP
may contain
\fBglob\fP(3)
characters and may match multiple files.
If it does and
\fIremote-path\fP
is specified, then
\fIremote-path\fP
must specify a directory.
If either the
\fB\-P\fP
or
\fB\-p\fP
flag is specified, then full file permissions and access times are
copied too.
If the
\fB\-r\fP
flag is specified then directories will be copied recursively.
Note that
\fBsftp\fP
does not follow symbolic links when performing recursive transfers.
.TP
\fBpwd\fP
Display remote working directory.
.TP
\fBquit\fP
Quit
\fBsftp\fP.
.TP
\fBrename \fIoldpath\fP \fInewpath\fP\fP
Rename remote file from
\fIoldpath\fP
to
\fInewpath\fP.
.TP
\fBrm \fIpath\fP\fP
Delete remote file specified by
\fIpath\fP.
.TP
\fBrmdir \fIpath\fP\fP
Remove remote directory specified by
\fIpath\fP.
.TP
\fBsymlink \fIoldpath\fP \fInewpath\fP\fP
Create a symbolic link from
\fIoldpath\fP
to
\fInewpath\fP.
.TP
\fBversion\fP
Display the
\fBsftp\fP
protocol version.
.TP
\fB\&! Ns \fIcommand\fP\fP
Execute
\fIcommand\fP
in local shell.
.TP
\fB\&!\fP
Escape to local shell.
.TP
\fB\&?\fP
Synonym for help.
.SH SEE ALSO
\fBftp\fP(1),
\fBls\fP(1),
\fBscp\fP(1),
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-keygen\fP(1),
\fBglob\fP(3),
\fBssh_config\fP(5),
\fBsftp-server\fP(8),
\fBsshd\fP(8)
S. Lehtinen and T. Ylonen, \fISSH File Transfer Protocol\fP, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material.
0707010002a812000081a400000000000000000000000150ff742700000fbd0000010000010031ffffffffffffffff0000002c00000000root/usr/local/share/man/man1/ssh-keyscan.1 .TH SSH-KEYSCAN 1 "April 11 2012 " ""
.SH NAME
\fBssh-keyscan\fP
\- gather ssh public keys
.SH SYNOPSIS
.br
\fBssh-keyscan\fP
[\fB\-46Hv\fP]
[\fB\-f\fP \fIfile\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-T\fP \fItimeout\fP]
[\fB\-t\fP \fItype\fP]
[\fIhost\fP | \fIaddrlist\fP namelist]
\fI...\fP
.SH DESCRIPTION
\fBssh-keyscan\fP
is a utility for gathering the public ssh host keys of a number of
hosts.
It was designed to aid in building and verifying
\fIssh_known_hosts\fP
files.
\fBssh-keyscan\fP
provides a minimal interface suitable for use by shell and perl
scripts.
\fBssh-keyscan\fP
uses non-blocking socket I/O to contact as many hosts as possible in
parallel, so it is very efficient.
The keys from a domain of 1,000
hosts can be collected in tens of seconds, even when some of those
hosts are down or do not run ssh.
For scanning, one does not need
login access to the machines that are being scanned, nor does the
scanning process involve any encryption.
The options are as follows:
.TP
\fB\-4\fP
Forces
\fBssh-keyscan\fP
to use IPv4 addresses only.
.TP
\fB\-6\fP
Forces
\fBssh-keyscan\fP
to use IPv6 addresses only.
.TP
\fB\-f\fP \fIfile\fP
Read hosts or
\fIaddrlist\fP namelist
pairs from this file, one per line.
If
\fI-\fP
is supplied instead of a filename,
\fBssh-keyscan\fP
will read hosts or
\fIaddrlist\fP namelist
pairs from the standard input.
.TP
\fB\-H\fP
Hash all hostnames and addresses in the output.
Hashed names may be used normally by
\fBssh\fP
and
\fBsshd\fP,
but they do not reveal identifying information should the file's contents
be disclosed.
.TP
\fB\-p\fP \fIport\fP
Port to connect to on the remote host.
.TP
\fB\-T\fP \fItimeout\fP
Set the timeout for connection attempts.
If
\fItimeout\fP
seconds have elapsed since a connection was initiated to a host or since the
last time anything was read from that host, then the connection is
closed and the host in question considered unavailable.
Default is 5 seconds.
.TP
\fB\-t\fP \fItype\fP
Specifies the type of the key to fetch from the scanned hosts.
The possible values are
``rsa1''
for protocol version 1 and
``dsa'',
``ecdsa''
or
``rsa''
for protocol version 2.
Multiple values may be specified by separating them with commas.
The default is to fetch
``rsa''
and
``ecdsa''
keys.
.TP
\fB\-v\fP
Verbose mode.
Causes
\fBssh-keyscan\fP
to print debugging messages about its progress.
.SH SECURITY
If an ssh_known_hosts file is constructed using
\fBssh-keyscan\fP
without verifying the keys, users will be vulnerable to
.IR man in the middle
attacks.
On the other hand, if the security model allows such a risk,
\fBssh-keyscan\fP
can help in the detection of tampered keyfiles or man in the middle
attacks which have begun after the ssh_known_hosts file was created.
.SH FILES
\fIInput\fP format:
1.2.3.4,1.2.4.4 name.my.domain,name,n.my.domain,n,1.2.3.4,1.2.4.4
.br
\fIOutput\fP format for rsa1 keys:
host-or-namelist bits exponent modulus
.br
\fIOutput\fP format for rsa, dsa and ecdsa keys:
host-or-namelist keytype base64-encoded-key
.br
Where
\fIkeytype\fP
is either
``ecdsa-sha2-nistp256'',
``ecdsa-sha2-nistp384'',
``ecdsa-sha2-nistp521'',
``ssh-dss''
or
``ssh-rsa''.
\fI/usr/local/etc/ssh_known_hosts\fP
.SH EXAMPLES
Print the
\fIrsa\fP
host key for machine
\fIhostname\fP:
$ ssh-keyscan hostname
.br
Find all hosts from the file
\fIssh_hosts\fP
which have new or different keys from those in the sorted file
\fIssh_known_hosts\fP:
$ ssh-keyscan -t rsa,dsa,ecdsa -f ssh_hosts | \e
.br
sort -u - ssh_known_hosts | diff ssh_known_hosts -
.br
.SH SEE ALSO
\fBssh\fP(1),
\fBsshd\fP(8)
.SH AUTHORS
-nosplit
David Mazieres
wrote the initial version, and
Wayne Davison
added support for protocol version 2.
.SH BUGS
It generates "Connection closed by remote host" messages on the consoles
of all the machines it scans if the server is older than version 2.9.
This is because it opens a connection to the ssh port, reads the public
key, and drops the connection as soon as it gets the key.
0707010002a80d000081a400000000000000000000000150ff7427000012de0000010000010031ffffffffffffffff0000002400000000root/usr/local/share/man/man1/scp.1 .TH SCP 1 "September 5 2011 " ""
.SH NAME
\fBscp\fP
\- secure copy (remote file copy program)
.SH SYNOPSIS
.br
\fBscp\fP
[\fB\-12346BCpqrv\fP]
[\fB\-c\fP \fIcipher\fP]
[\fB\-F\fP \fIssh_config\fP]
[\fB\-i\fP \fIidentity_file\fP]
[\fB\-l\fP \fIlimit\fP]
[\fB\-o\fP \fIssh_option\fP]
[\fB\-P\fP \fIport\fP]
[\fB\-S\fP \fIprogram\fP]
[[\fIuser\fP@]\fIhost1\fP:]\fIfile1\fP
\fI...\fP
[[\fIuser\fP@]\fIhost2\fP:]\fIfile2\fP
.SH DESCRIPTION
\fBscp\fP
copies files between hosts on a network.
It uses
\fBssh\fP(1)
for data transfer, and uses the same authentication and provides the
same security as
\fBssh\fP(1).
Unlike
\fBrcp\fP(1),
\fBscp\fP
will ask for passwords or passphrases if they are needed for
authentication.
File names may contain a user and host specification to indicate
that the file is to be copied to/from that host.
Local file names can be made explicit using absolute or relative pathnames
to avoid
\fBscp\fP
treating file names containing
`:\&'
as host specifiers.
Copies between two remote hosts are also permitted.
The options are as follows:
.TP
\fB\-1\fP
Forces
\fBscp\fP
to use protocol 1.
.TP
\fB\-2\fP
Forces
\fBscp\fP
to use protocol 2.
.TP
\fB\-3\fP
Copies between two remote hosts are transferred through the local host.
Without this option the data is copied directly between the two remote
hosts.
Note that this option disables the progress meter.
.TP
\fB\-4\fP
Forces
\fBscp\fP
to use IPv4 addresses only.
.TP
\fB\-6\fP
Forces
\fBscp\fP
to use IPv6 addresses only.
.TP
\fB\-B\fP
Selects batch mode (prevents asking for passwords or passphrases).
.TP
\fB\-C\fP
Compression enable.
Passes the
\fB\-C\fP
flag to
\fBssh\fP(1)
to enable compression.
.TP
\fB\-c\fP \fIcipher\fP
Selects the cipher to use for encrypting the data transfer.
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-F\fP \fIssh_config\fP
Specifies an alternative
per-user configuration file for
\fBssh\fP.
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-i\fP \fIidentity_file\fP
Selects the file from which the identity (private key) for public key
authentication is read.
This option is directly passed to
\fBssh\fP(1).
.TP
\fB\-l\fP \fIlimit\fP
Limits the used bandwidth, specified in Kbit/s.
.TP
\fB\-o\fP \fIssh_option\fP
Can be used to pass options to
\fBssh\fP
in the format used in
\fBssh_config\fP(5).
This is useful for specifying options
for which there is no separate
\fBscp\fP
command-line flag.
For full details of the options listed below, and their possible values, see
\fBssh_config\fP(5).
.TP
AddressFamily
.TP
BatchMode
.TP
BindAddress
.TP
ChallengeResponseAuthentication
.TP
CheckHostIP
.TP
Cipher
.TP
Ciphers
.TP
Compression
.TP
CompressionLevel
.TP
ConnectionAttempts
.TP
ConnectTimeout
.TP
ControlMaster
.TP
ControlPath
.TP
ControlPersist
.TP
GlobalKnownHostsFile
.TP
GSSAPIAuthentication
.TP
GSSAPIDelegateCredentials
.TP
HashKnownHosts
.TP
Host
.TP
HostbasedAuthentication
.TP
HostKeyAlgorithms
.TP
HostKeyAlias
.TP
HostName
.TP
IdentityFile
.TP
IdentitiesOnly
.TP
IPQoS
.TP
KbdInteractiveAuthentication
.TP
KbdInteractiveDevices
.TP
KexAlgorithms
.TP
LogLevel
.TP
MACs
.TP
NoHostAuthenticationForLocalhost
.TP
NumberOfPasswordPrompts
.TP
PasswordAuthentication
.TP
PKCS11Provider
.TP
Port
.TP
PreferredAuthentications
.TP
Protocol
.TP
ProxyCommand
.TP
PubkeyAuthentication
.TP
RekeyLimit
.TP
RhostsRSAAuthentication
.TP
RSAAuthentication
.TP
SendEnv
.TP
ServerAliveInterval
.TP
ServerAliveCountMax
.TP
StrictHostKeyChecking
.TP
TCPKeepAlive
.TP
UsePrivilegedPort
.TP
User
.TP
UserKnownHostsFile
.TP
VerifyHostKeyDNS
.TP
\fB\-P\fP \fIport\fP
Specifies the port to connect to on the remote host.
Note that this option is written with a capital
`P',
because
\fB\-p\fP
is already reserved for preserving the times and modes of the file in
\fBrcp\fP(1).
.TP
\fB\-p\fP
Preserves modification times, access times, and modes from the
original file.
.TP
\fB\-q\fP
Quiet mode: disables the progress meter as well as warning and diagnostic
messages from
\fBssh\fP(1).
.TP
\fB\-r\fP
Recursively copy entire directories.
Note that
\fBscp\fP
follows symbolic links encountered in the tree traversal.
.TP
\fB\-S\fP \fIprogram\fP
Name of
\fIprogram\fP
to use for the encrypted connection.
The program must understand
\fBssh\fP(1)
options.
.TP
\fB\-v\fP
Verbose mode.
Causes
\fBscp\fP
and
\fBssh\fP(1)
to print debugging messages about their progress.
This is helpful in
debugging connection, authentication, and configuration problems.
.SH EXIT STATUS
Ex -std scp
.SH SEE ALSO
\fBrcp\fP(1),
\fBsftp\fP(1),
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-agent\fP(1),
\fBssh-keygen\fP(1),
\fBssh_config\fP(5),
\fBsshd\fP(8)
.SH HISTORY
\fBscp\fP
is based on the
\fBrcp\fP(1)
program in BSD source code from the Regents of the University of
California.
.SH AUTHORS
Timo Rinne
Tatu Ylonen
0707010002a810000081a400000000000000000000000150ff7427000014590000010000010031ffffffffffffffff0000002a00000000root/usr/local/share/man/man1/ssh-agent.1 .TH SSH-AGENT 1 "November 21 2010 " ""
.SH NAME
\fBssh-agent\fP
\- authentication agent
.SH SYNOPSIS
.br
\fBssh-agent\fP
[\fB\-c\fP | s]
[\fB\-d\fP]
[\fB\-a\fP \fIbind_address\fP]
[\fB\-t\fP \fIlife\fP]
[\fIcommand\fP [\fIarg\fP...]
.br
\fBssh-agent\fP
[\fB\-c\fP | s]
\fB\-k\fP
.SH DESCRIPTION
\fBssh-agent\fP
is a program to hold private keys used for public key authentication
(RSA, DSA, ECDSA).
The idea is that
\fBssh-agent\fP
is started in the beginning of an X-session or a login session, and
all other windows or programs are started as clients to the ssh-agent
program.
Through use of environment variables the agent can be located
and automatically used for authentication when logging in to other
machines using
\fBssh\fP(1).
The options are as follows:
.TP
\fB\-a\fP \fIbind_address\fP
Bind the agent to the
UNIX-domain
socket
\fIbind_address\fP.
The default is
\fI$TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt\fP.
.TP
\fB\-c\fP
Generate C-shell commands on
.BR stdout .
This is the default if
.IR SHELL
looks like it's a csh style of shell.
.TP
\fB\-d\fP
Debug mode.
When this option is specified
\fBssh-agent\fP
will not fork.
.TP
\fB\-k\fP
Kill the current agent (given by the
.IR SSH_AGENT_PID
environment variable).
.TP
\fB\-s\fP
Generate Bourne shell commands on
.BR stdout .
This is the default if
.IR SHELL
does not look like it's a csh style of shell.
.TP
\fB\-t\fP \fIlife\fP
Set a default value for the maximum lifetime of identities added to the agent.
The lifetime may be specified in seconds or in a time format specified in
\fBsshd_config\fP(5).
A lifetime specified for an identity with
\fBssh-add\fP(1)
overrides this value.
Without this option the default maximum lifetime is forever.
If a commandline is given, this is executed as a subprocess of the agent.
When the command dies, so does the agent.
The agent initially does not have any private keys.
Keys are added using
\fBssh-add\fP(1).
When executed without arguments,
\fBssh-add\fP(1)
adds the files
\fI~/.ssh/id_rsa\fP,
\fI~/.ssh/id_dsa\fP,
\fI~/.ssh/id_ecdsa\fP
and
\fI~/.ssh/identity\fP.
If the identity has a passphrase,
\fBssh-add\fP(1)
asks for the passphrase on the terminal if it has one or from a small X11
program if running under X11.
If neither of these is the case then the authentication will fail.
It then sends the identity to the agent.
Several identities can be stored in the
agent; the agent can automatically use any of these identities.
\fBssh-add -l\fP
displays the identities currently held by the agent.
The idea is that the agent is run in the user's local PC, laptop, or
terminal.
Authentication data need not be stored on any other
machine, and authentication passphrases never go over the network.
However, the connection to the agent is forwarded over SSH
remote logins, and the user can thus use the privileges given by the
identities anywhere in the network in a secure way.
There are two main ways to get an agent set up:
The first is that the agent starts a new subcommand into which some environment
variables are exported, eg
\fBssh-agent\fP xterm & .
The second is that the agent prints the needed shell commands (either
\fBsh\fP(1)
or
\fBcsh\fP(1)
syntax can be generated) which can be evaluated in the calling shell, eg
\fBeval\fP `ssh-agent -s`
for Bourne-type shells such as
\fBsh\fP(1)
or
\fBksh\fP(1)
and
\fBeval\fP `ssh-agent -c`
for
\fBcsh\fP(1)
and derivatives.
Later
\fBssh\fP(1)
looks at these variables and uses them to establish a connection to the agent.
The agent will never send a private key over its request channel.
Instead, operations that require a private key will be performed
by the agent, and the result will be returned to the requester.
This way, private keys are not exposed to clients using the agent.
A
UNIX-domain
socket is created and the name of this socket is stored in the
.IR SSH_AUTH_SOCK
environment
variable.
The socket is made accessible only to the current user.
This method is easily abused by root or another instance of the same
user.
The
.IR SSH_AGENT_PID
environment variable holds the agent's process ID.
The agent exits automatically when the command given on the command
line terminates.
.SH FILES
.TP
.B ~/.ssh/identity
Contains the protocol version 1 RSA authentication identity of the user.
.TP
.B ~/.ssh/id_dsa
Contains the protocol version 2 DSA authentication identity of the user.
.TP
.B ~/.ssh/id_ecdsa
Contains the protocol version 2 ECDSA authentication identity of the user.
.TP
.B ~/.ssh/id_rsa
Contains the protocol version 2 RSA authentication identity of the user.
.TP
.B $TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt
UNIX-domain
sockets used to contain the connection to the authentication agent.
These sockets should only be readable by the owner.
The sockets should get automatically removed when the agent exits.
.SH SEE ALSO
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-keygen\fP(1),
\fBsshd\fP(8)
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
0707010002a811000081a400000000000000000000000150ff7427000050960000010000010031ffffffffffffffff0000002b00000000root/usr/local/share/man/man1/ssh-keygen.1 .TH SSH-KEYGEN 1 "July 6 2012 " ""
.SH NAME
\fBssh-keygen\fP
\- authentication key generation, management and conversion
.SH SYNOPSIS
.br
\fBssh-keygen\fP
[\fB\-q\fP]
[\fB\-b\fP \fIbits\fP]
\fB\-t\fP \fItype\fP
[\fB\-N\fP \fInew_passphrase\fP]
[\fB\-C\fP \fIcomment\fP]
[\fB\-f\fP \fIoutput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-p\fP
[\fB\-P\fP \fIold_passphrase\fP]
[\fB\-N\fP \fInew_passphrase\fP]
[\fB\-f\fP \fIkeyfile\fP]
.br
\fBssh-keygen\fP
\fB\-i\fP
[\fB\-m\fP \fIkey_format\fP]
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-e\fP
[\fB\-m\fP \fIkey_format\fP]
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-y\fP
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-c\fP
[\fB\-P\fP \fIpassphrase\fP]
[\fB\-C\fP \fIcomment\fP]
[\fB\-f\fP \fIkeyfile\fP]
.br
\fBssh-keygen\fP
\fB\-l\fP
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-B\fP
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-D\fP \fIpkcs11\fP
.br
\fBssh-keygen\fP
\fB\-F\fP \fIhostname\fP
[\fB\-f\fP \fIknown_hosts_file\fP]
[\fB\-l\fP]
.br
\fBssh-keygen\fP
\fB\-H\fP
[\fB\-f\fP \fIknown_hosts_file\fP]
.br
\fBssh-keygen\fP
\fB\-R\fP \fIhostname\fP
[\fB\-f\fP \fIknown_hosts_file\fP]
.br
\fBssh-keygen\fP
\fB\-r\fP \fIhostname\fP
[\fB\-f\fP \fIinput_keyfile\fP]
[\fB\-g\fP]
.br
\fBssh-keygen\fP
\fB\-G\fP \fIoutput_file\fP
[\fB\-v\fP]
[\fB\-b\fP \fIbits\fP]
[\fB\-M\fP \fImemory\fP]
[\fB\-S\fP \fIstart_point\fP]
.br
\fBssh-keygen\fP
\fB\-T\fP \fIoutput_file\fP
\fB\-f\fP \fIinput_file\fP
[\fB\-v\fP]
[\fB\-a\fP \fInum_trials\fP]
[\fB\-J\fP \fInum_lines\fP]
[\fB\-j\fP \fIstart_line\fP]
[\fB\-K\fP \fIcheckpt\fP]
[\fB\-W\fP \fIgenerator\fP]
.br
\fBssh-keygen\fP
\fB\-s\fP \fIca_key\fP
\fB\-I\fP \fIcertificate_identity\fP
[\fB\-h\fP]
[\fB\-n\fP \fIprincipals\fP]
[\fB\-O\fP \fIoption\fP]
[\fB\-V\fP \fIvalidity_interval\fP]
[\fB\-z\fP \fIserial_number\fP]
\fIfile ...\fP
.br
\fBssh-keygen\fP
\fB\-L\fP
[\fB\-f\fP \fIinput_keyfile\fP]
.br
\fBssh-keygen\fP
\fB\-A\fP
.SH DESCRIPTION
\fBssh-keygen\fP
generates, manages and converts authentication keys for
\fBssh\fP(1).
\fBssh-keygen\fP
can create RSA keys for use by SSH protocol version 1 and DSA, ECDSA or RSA
keys for use by SSH protocol version 2.
The type of key to be generated is specified with the
\fB\-t\fP
option.
If invoked without any arguments,
\fBssh-keygen\fP
will generate an RSA key for use in SSH protocol 2 connections.
\fBssh-keygen\fP
is also used to generate groups for use in Diffie-Hellman group
exchange (DH-GEX).
See the
.B MODULI GENERATION
section for details.
Normally each user wishing to use SSH
with public key authentication runs this once to create the authentication
key in
\fI~/.ssh/identity\fP,
\fI~/.ssh/id_ecdsa\fP,
\fI~/.ssh/id_dsa\fP
or
\fI~/.ssh/id_rsa\fP.
Additionally, the system administrator may use this to generate host keys,
as seen in
\fI/etc/rc\fP.
Normally this program generates the key and asks for a file in which
to store the private key.
The public key is stored in a file with the same name but
``.pub''
appended.
The program also asks for a passphrase.
The passphrase may be empty to indicate no passphrase
(host keys must have an empty passphrase), or it may be a string of
arbitrary length.
A passphrase is similar to a password, except it can be a phrase with a
series of words, punctuation, numbers, whitespace, or any string of
characters you want.
Good passphrases are 10-30 characters long, are
not simple sentences or otherwise easily guessable (English
prose has only 1-2 bits of entropy per character, and provides very bad
passphrases), and contain a mix of upper and lowercase letters,
numbers, and non-alphanumeric characters.
The passphrase can be changed later by using the
\fB\-p\fP
option.
There is no way to recover a lost passphrase.
If the passphrase is lost or forgotten, a new key must be generated
and the corresponding public key copied to other machines.
For RSA1 keys,
there is also a comment field in the key file that is only for
convenience to the user to help identify the key.
The comment can tell what the key is for, or whatever is useful.
The comment is initialized to
``user@host''
when the key is created, but can be changed using the
\fB\-c\fP
option.
After a key is generated, instructions below detail where the keys
should be placed to be activated.
The options are as follows:
.TP
\fB\-A\fP
For each of the key types (rsa1, rsa, dsa and ecdsa) for which host keys
do not exist, generate the host keys with the default key file path,
an empty passphrase, default bits for the key type, and default comment.
This is used by
\fI/etc/rc\fP
to generate new host keys.
.TP
\fB\-a\fP \fItrials\fP
Specifies the number of primality tests to perform when screening DH-GEX
candidates using the
\fB\-T\fP
command.
.TP
\fB\-B\fP
Show the bubblebabble digest of specified private or public key file.
.TP
\fB\-b\fP \fIbits\fP
Specifies the number of bits in the key to create.
For RSA keys, the minimum size is 768 bits and the default is 2048 bits.
Generally, 2048 bits is considered sufficient.
DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
For ECDSA keys, the
\fB\-b\fP
flag determines the key length by selecting from one of three elliptic
curve sizes: 256, 384 or 521 bits.
Attempting to use bit lengths other than these three values for ECDSA keys
will fail.
.TP
\fB\-C\fP \fIcomment\fP
Provides a new comment.
.TP
\fB\-c\fP
Requests changing the comment in the private and public key files.
This operation is only supported for RSA1 keys.
The program will prompt for the file containing the private keys, for
the passphrase if the key has one, and for the new comment.
.TP
\fB\-D\fP \fIpkcs11\fP
Download the RSA public keys provided by the PKCS#11 shared library
\fIpkcs11\fP.
When used in combination with
\fB\-s\fP,
this option indicates that a CA key resides in a PKCS#11 token (see the
.B CERTIFICATES
section for details).
.TP
\fB\-e\fP
This option will read a private or public OpenSSH key file and
print to stdout the key in one of the formats specified by the
\fB\-m\fP
option.
The default export format is
``RFC4716''.
This option allows exporting OpenSSH keys for use by other programs, including
several commercial SSH implementations.
.TP
\fB\-F\fP \fIhostname\fP
Search for the specified
\fIhostname\fP
in a
\fIknown_hosts\fP
file, listing any occurrences found.
This option is useful to find hashed host names or addresses and may also be
used in conjunction with the
\fB\-H\fP
option to print found keys in a hashed format.
.TP
\fB\-f\fP \fIfilename\fP
Specifies the filename of the key file.
.TP
\fB\-G\fP \fIoutput_file\fP
Generate candidate primes for DH-GEX.
These primes must be screened for
safety (using the
\fB\-T\fP
option) before use.
.TP
\fB\-g\fP
Use generic DNS format when printing fingerprint resource records using the
\fB\-r\fP
command.
.TP
\fB\-H\fP
Hash a
\fIknown_hosts\fP
file.
This replaces all hostnames and addresses with hashed representations
within the specified file; the original content is moved to a file with
a .old suffix.
These hashes may be used normally by
\fBssh\fP
and
\fBsshd\fP,
but they do not reveal identifying information should the file's contents
be disclosed.
This option will not modify existing hashed hostnames and is therefore safe
to use on files that mix hashed and non-hashed names.
.TP
\fB\-h\fP
When signing a key, create a host certificate instead of a user
certificate.
Please see the
.B CERTIFICATES
section for details.
.TP
\fB\-I\fP \fIcertificate_identity\fP
Specify the key identity when signing a public key.
Please see the
.B CERTIFICATES
section for details.
.TP
\fB\-i\fP
This option will read an unencrypted private (or public) key file
in the format specified by the
\fB\-m\fP
option and print an OpenSSH compatible private
(or public) key to stdout.
.TP
\fB\-J\fP \fInum_lines\fP
Exit after screening the specified number of lines
while performing DH candidate screening using the
\fB\-T\fP
option.
.TP
\fB\-j\fP \fIstart_line\fP
Start screening at the specified line number
while performing DH candidate screening using the
\fB\-T\fP
option.
.TP
\fB\-K\fP \fIcheckpt\fP
Write the last line processed to the file
\fIcheckpt\fP
while performing DH candidate screening using the
\fB\-T\fP
option.
This will be used to skip lines in the input file that have already been
processed if the job is restarted.
This option allows importing keys from other software, including several
commercial SSH implementations.
The default import format is
``RFC4716''.
.TP
\fB\-L\fP
Prints the contents of a certificate.
.TP
\fB\-l\fP
Show fingerprint of specified public key file.
Private RSA1 keys are also supported.
For RSA and DSA keys
\fBssh-keygen\fP
tries to find the matching public key file and prints its fingerprint.
If combined with
\fB\-v\fP,
an ASCII art representation of the key is supplied with the fingerprint.
.TP
\fB\-M\fP \fImemory\fP
Specify the amount of memory to use (in megabytes) when generating
candidate moduli for DH-GEX.
.TP
\fB\-m\fP \fIkey_format\fP
Specify a key format for the
\fB\-i\fP
(import) or
\fB\-e\fP
(export) conversion options.
The supported key formats are:
``RFC4716''
(RFC 4716/SSH2 public or private key),
``PKCS8''
(PEM PKCS8 public key)
or
``PEM''
(PEM public key).
The default conversion format is
``RFC4716''.
.TP
\fB\-N\fP \fInew_passphrase\fP
Provides the new passphrase.
.TP
\fB\-n\fP \fIprincipals\fP
Specify one or more principals (user or host names) to be included in
a certificate when signing a key.
Multiple principals may be specified, separated by commas.
Please see the
.B CERTIFICATES
section for details.
.TP
\fB\-O\fP \fIoption\fP
Specify a certificate option when signing a key.
This option may be specified multiple times.
Please see the
.B CERTIFICATES
section for details.
The options that are valid for user certificates are:
.TP
\fBclear\fP
Clear all enabled permissions.
This is useful for clearing the default set of permissions so permissions may
be added individually.
.TP
\fBforce-command Ns = Ns \fIcommand\fP\fP
Forces the execution of
\fIcommand\fP
instead of any shell or command specified by the user when
the certificate is used for authentication.
.TP
\fBno-agent-forwarding\fP
Disable
\fBssh-agent\fP(1)
forwarding (permitted by default).
.TP
\fBno-port-forwarding\fP
Disable port forwarding (permitted by default).
.TP
\fBno-pty\fP
Disable PTY allocation (permitted by default).
.TP
\fBno-user-rc\fP
Disable execution of
\fI~/.ssh/rc\fP
by
\fBsshd\fP(8)
(permitted by default).
.TP
\fBno-x11-forwarding\fP
Disable X11 forwarding (permitted by default).
.TP
\fBpermit-agent-forwarding\fP
Allows
\fBssh-agent\fP(1)
forwarding.
.TP
\fBpermit-port-forwarding\fP
Allows port forwarding.
.TP
\fBpermit-pty\fP
Allows PTY allocation.
.TP
\fBpermit-user-rc\fP
Allows execution of
\fI~/.ssh/rc\fP
by
\fBsshd\fP(8).
.TP
\fBpermit-x11-forwarding\fP
Allows X11 forwarding.
.TP
\fBsource-address Ns = Ns \fIaddress_list\fP\fP
Restrict the source addresses from which the certificate is considered valid.
The
\fIaddress_list\fP
is a comma-separated list of one or more address/netmask pairs in CIDR
format.
At present, no options are valid for host keys.
.TP
\fB\-P\fP \fIpassphrase\fP
Provides the (old) passphrase.
.TP
\fB\-p\fP
Requests changing the passphrase of a private key file instead of
creating a new private key.
The program will prompt for the file
containing the private key, for the old passphrase, and twice for the
new passphrase.
.TP
\fB\-q\fP
Silence
\fBssh-keygen\fP.
.TP
\fB\-R\fP \fIhostname\fP
Removes all keys belonging to
\fIhostname\fP
from a
\fIknown_hosts\fP
file.
This option is useful to delete hashed hosts (see the
\fB\-H\fP
option above).
.TP
\fB\-r\fP \fIhostname\fP
Print the SSHFP fingerprint resource record named
\fIhostname\fP
for the specified public key file.
.TP
\fB\-S\fP \fIstart\fP
Specify start point (in hex) when generating candidate moduli for DH-GEX.
.TP
\fB\-s\fP \fIca_key\fP
Certify (sign) a public key using the specified CA key.
Please see the
.B CERTIFICATES
section for details.
.TP
\fB\-T\fP \fIoutput_file\fP
Test DH group exchange candidate primes (generated using the
\fB\-G\fP
option) for safety.
.TP
\fB\-t\fP \fItype\fP
Specifies the type of key to create.
The possible values are
``rsa1''
for protocol version 1 and
``dsa'',
``ecdsa''
or
``rsa''
for protocol version 2.
.TP
\fB\-V\fP \fIvalidity_interval\fP
Specify a validity interval when signing a certificate.
A validity interval may consist of a single time, indicating that the
certificate is valid beginning now and expiring at that time, or may consist
of two times separated by a colon to indicate an explicit time interval.
The start time may be specified as a date in YYYYMMDD format, a time
in YYYYMMDDHHMMSS format or a relative time (to the current time) consisting
of a minus sign followed by a relative time in the format described in the
.B TIME FORMATS
section of
\fBsshd_config\fP(5).
The end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMMSS time or
a relative time starting with a plus character.
For example:
``+52w1d''
(valid from now to 52 weeks and one day from now),
``-4w:+4w''
(valid from four weeks ago to four weeks from now),
``20100101123000:20110101123000''
(valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
``-1d:20110101''
(valid from yesterday to midnight, January 1st, 2011).
.TP
\fB\-v\fP
Verbose mode.
Causes
\fBssh-keygen\fP
to print debugging messages about its progress.
This is helpful for debugging moduli generation.
Multiple
\fB\-v\fP
options increase the verbosity.
The maximum is 3.
.TP
\fB\-W\fP \fIgenerator\fP
Specify desired generator when testing candidate moduli for DH-GEX.
.TP
\fB\-y\fP
This option will read a private
OpenSSH format file and print an OpenSSH public key to stdout.
.TP
\fB\-z\fP \fIserial_number\fP
Specifies a serial number to be embedded in the certificate to distinguish
this certificate from others from the same CA.
The default serial number is zero.
.SH MODULI GENERATION
\fBssh-keygen\fP
may be used to generate groups for the Diffie-Hellman Group Exchange
(DH-GEX) protocol.
Generating these groups is a two-step process: first, candidate
primes are generated using a fast, but memory intensive process.
These candidate primes are then tested for suitability (a CPU-intensive
process).
Generation of primes is performed using the
\fB\-G\fP
option.
The desired length of the primes may be specified by the
\fB\-b\fP
option.
For example:
Dl # ssh-keygen -G moduli-2048.candidates -b 2048
By default, the search for primes begins at a random point in the
desired length range.
This may be overridden using the
\fB\-S\fP
option, which specifies a different start point (in hex).
Once a set of candidates have been generated, they must be screened for
suitability.
This may be performed using the
\fB\-T\fP
option.
In this mode
\fBssh-keygen\fP
will read candidates from standard input (or a file specified using the
\fB\-f\fP
option).
For example:
Dl # ssh-keygen -T moduli-2048 -f moduli-2048.candidates
By default, each candidate will be subjected to 100 primality tests.
This may be overridden using the
\fB\-a\fP
option.
The DH generator value will be chosen automatically for the
prime under consideration.
If a specific generator is desired, it may be requested using the
\fB\-W\fP
option.
Valid generator values are 2, 3, and 5.
Screened DH groups may be installed in
\fI/usr/local/etc/moduli\fP.
It is important that this file contains moduli of a range of bit lengths and
that both ends of a connection share common moduli.
.SH CERTIFICATES
\fBssh-keygen\fP
supports signing of keys to produce certificates that may be used for
user or host authentication.
Certificates consist of a public key, some identity information, zero or
more principal (user or host) names and a set of options that
are signed by a Certification Authority (CA) key.
Clients or servers may then trust only the CA key and verify its signature
on a certificate rather than trusting many user/host keys.
Note that OpenSSH certificates are a different, and much simpler, format to
the X.509 certificates used in
\fBssl\fP(8).
\fBssh-keygen\fP
supports two types of certificates: user and host.
User certificates authenticate users to servers, whereas host certificates
authenticate server hosts to users.
To generate a user certificate:
Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
The resultant certificate will be placed in
\fI/path/to/user_key-cert.pub\fP.
A host certificate requires the
\fB\-h\fP
option:
Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
The host certificate will be output to
\fI/path/to/host_key-cert.pub\fP.
It is possible to sign using a CA key stored in a PKCS#11 token by
providing the token library using
\fB\-D\fP
and identifying the CA key by providing its public half as an argument
to
\fB\-s\fP :
Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id host_key.pub
In all cases,
\fIkey_id\fP
is a "key identifier" that is logged by the server when the certificate
is used for authentication.
Certificates may be limited to be valid for a set of principal (user/host)
names.
By default, generated certificates are valid for all users or hosts.
To generate a certificate for a specified set of principals:
Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub"
Additional limitations on the validity and use of user certificates may
be specified through certificate options.
A certificate option may disable features of the SSH session, may be
valid only when presented from particular source addresses or may
force the use of a specific command.
For a list of valid certificate options, see the documentation for the
\fB\-O\fP
option above.
Finally, certificates may be defined with a validity lifetime.
The
\fB\-V\fP
option allows specification of certificate start and end times.
A certificate that is presented at a time outside this range will not be
considered valid.
By default, certificates have a maximum validity interval.
For certificates to be used for user or host authentication, the CA
public key must be trusted by
\fBsshd\fP(8)
or
\fBssh\fP(1).
Please refer to those manual pages for details.
.SH FILES
.TP
.B ~/.ssh/identity
Contains the protocol version 1 RSA authentication identity of the user.
This file should not be readable by anyone but the user.
It is possible to
specify a passphrase when generating the key; that passphrase will be
used to encrypt the private part of this file using 3DES.
This file is not automatically accessed by
\fBssh-keygen\fP
but it is offered as the default file for the private key.
\fBssh\fP(1)
will read this file when a login attempt is made.
.TP
.B ~/.ssh/identity.pub
Contains the protocol version 1 RSA public key for authentication.
The contents of this file should be added to
\fI~/.ssh/authorized_keys\fP
on all machines
where the user wishes to log in using RSA authentication.
There is no need to keep the contents of this file secret.
.TP
.B ~/.ssh/id_dsa
.TP
.B ~/.ssh/id_ecdsa
.TP
.B ~/.ssh/id_rsa
Contains the protocol version 2 DSA, ECDSA or RSA authentication identity of the user.
This file should not be readable by anyone but the user.
It is possible to
specify a passphrase when generating the key; that passphrase will be
used to encrypt the private part of this file using 128-bit AES.
This file is not automatically accessed by
\fBssh-keygen\fP
but it is offered as the default file for the private key.
\fBssh\fP(1)
will read this file when a login attempt is made.
.TP
.B ~/.ssh/id_dsa.pub
.TP
.B ~/.ssh/id_ecdsa.pub
.TP
.B ~/.ssh/id_rsa.pub
Contains the protocol version 2 DSA, ECDSA or RSA public key for authentication.
The contents of this file should be added to
\fI~/.ssh/authorized_keys\fP
on all machines
where the user wishes to log in using public key authentication.
There is no need to keep the contents of this file secret.
.TP
.B /usr/local/etc/moduli
Contains Diffie-Hellman groups used for DH-GEX.
The file format is described in
\fBmoduli\fP(5).
.SH SEE ALSO
\fBssh\fP(1),
\fBssh-add\fP(1),
\fBssh-agent\fP(1),
\fBmoduli\fP(5),
\fBsshd\fP(8)
\fIThe Secure Shell (SSH) Public Key File Format\fP, RFC 4716, 2006.
.SH AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
0707010002a7f3000041ed00000000000000000000000250ff747d000000000000010000010031ffffffffffffffff0000001300000000root/usr/local/bin 0707010002a7fa000081ed00000000000000000000000150ff7426000826980000010000010031ffffffffffffffff0000001f00000000root/usr/local/bin/ssh-keyscan ELF + @ @ @ 8 @ @ @ X X 6 6 6 6 S k x x /usr/lib/sparcv9/ld.so.1 G G
! # $ % &