⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh.1

📁 OpenSSH 是 SSH (Secure SHell) 协议的免费开源实现。它用安全、加密的网络连接工具代替了 telnet、ftp、 rlogin、rsh 和 rcp 工具。OpenSSH 支持
💻 1
📖 第 1 页 / 共 3 页
字号:
for details..It Fl sMay be used to request invocation of a subsystem on the remote system.Subsystems are a feature of the SSH2 protocol which facilitate the useof SSH as a secure transport for other applications (eg.\&.Xr sftp 1 ) .The subsystem is specified as the remote command..It Fl TDisable pseudo-tty allocation..It Fl tForce pseudo-tty allocation.This can be used to execute arbitraryscreen-based programs on a remote machine, which can be very useful,e.g., when implementing menu services.Multiple.Fl toptions force tty allocation, even if.Nmhas no local tty..It Fl VDisplay the version number and exit..It Fl vVerbose mode.Causes.Nmto print debugging messages about its progress.This is helpful indebugging connection, authentication, and configuration problems.Multiple.Fl voptions increase the verbosity.The maximum is 3..It Fl XEnables X11 forwarding.This can also be specified on a per-host basis in a configuration file..PpX11 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..PpFor this reason, X11 forwarding is subjected to X11 SECURITY extensionrestrictions by default.Please refer to the.Nm.Fl Yoption and the.Cm ForwardX11Trusteddirective in.Xr ssh_config 5for more information..It Fl xDisables X11 forwarding..It Fl YEnables trusted X11 forwarding.Trusted X11 forwardings are not subjected to the X11 SECURITY extensioncontrols..El.Sh CONFIGURATION FILES.Nmmay additionally obtain configuration data froma per-user configuration file and a system-wide configuration file.The file format and configuration options are described in.Xr ssh_config 5 ..Sh ENVIRONMENT.Nmwill normally set the following environment variables:.Bl -tag -width LOGNAME.It Ev DISPLAYThe.Ev DISPLAYvariable indicates the location of the X11 server.It is automatically set by.Nmto point to a value of the form.Dq hostname:nwhere hostname indicatesthe host where the shell runs, and n is an integer \*(Ge 1..Nmuses this special value to forward X11 connections over the securechannel.The user should normally not set.Ev DISPLAYexplicitly, as thatwill render the X11 connection insecure (and will require the user tomanually copy any required authorization cookies)..It Ev HOMESet to the path of the user's home directory..It Ev LOGNAMESynonym for.Ev USER ;set for compatibility with systems that use this variable..It Ev MAILSet to the path of the user's mailbox..It Ev PATHSet to the default.Ev PATH ,as specified when compiling.Nm ssh ..It Ev SSH_ASKPASSIf.Nmneeds a passphrase, it will read the passphrase from the currentterminal if it was run from a terminal.If.Nmdoes not have a terminal associated with it but.Ev DISPLAYand.Ev SSH_ASKPASSare set, it will execute the program specified by.Ev SSH_ASKPASSand open an X11 window to read the passphrase.This is particularly useful when calling.Nmfrom a.Pa .xsessionor related script.(Note that on some machines itmay be necessary to redirect the input from.Pa /dev/nullto make this work.).It Ev SSH_AUTH_SOCKIdentifies the path of a unix-domain socket used to communicate with theagent..It Ev SSH_CONNECTIONIdentifies the client and server ends of the connection.The variable containsfour space-separated values: client ip-address, client port number,server ip-address and server port number..It Ev SSH_ORIGINAL_COMMANDThe variable contains the original command line if a forced commandis executed.It can be used to extract the original arguments..It Ev SSH_TTYThis is set to the name of the tty (path to the device) associatedwith the current shell or command.If the current session has no tty,this variable is not set..It Ev TZThe timezone variable is set to indicate the present timezone if itwas set when the daemon was started (i.e., the daemon passes the valueon to new connections)..It Ev USERSet to the name of the user logging in..El.PpAdditionally,.Nmreads.Pa $HOME/.ssh/environment ,and adds lines of the format.Dq VARNAME=valueto the environment if the file exists and if users are allowed tochange their environment.For more information, see the.Cm PermitUserEnvironmentoption in.Xr sshd_config 5 ..Sh FILES.Bl -tag -width Ds.It Pa $HOME/.ssh/known_hostsRecords host keys for all hosts the user has logged into that are notin.Pa /etc/ssh/ssh_known_hosts .See.Xr sshd 8 ..It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa, $HOME/.ssh/id_rsaContains the authentication identity of the user.They are for protocol 1 RSA, protocol 2 DSA, and protocol 2 RSA, respectively.These filescontain sensitive data and should be readable by the user but notaccessible by others (read/write/execute).Note that.Nmignores a private key file if it is accessible by others.It is possible to specify a passphrase whengenerating the key; the passphrase will be used to encrypt thesensitive part of this file using 3DES..It Pa $HOME/.ssh/identity.pub, $HOME/.ssh/id_dsa.pub, $HOME/.ssh/id_rsa.pubContains the public key for authentication (public part of theidentity file in human-readable form).The contents of the.Pa $HOME/.ssh/identity.pubfile should be added to the file.Pa $HOME/.ssh/authorized_keyson all machineswhere the user wishes to log in using protocol version 1 RSA authentication.The contents of the.Pa $HOME/.ssh/id_dsa.puband.Pa $HOME/.ssh/id_rsa.pubfile should be added to.Pa $HOME/.ssh/authorized_keyson all machineswhere the user wishes to log in using protocol version 2 DSA/RSA authentication.These files are notsensitive and can (but need not) be readable by anyone.These files arenever used automatically and are not necessary; they are only provided forthe convenience of the user..It Pa $HOME/.ssh/configThis is the per-user configuration file.The file format and configuration options are described in.Xr ssh_config 5 .Because of the potential for abuse, this file must have strict permissions:read/write for the user, and not accessible by others..It Pa $HOME/.ssh/authorized_keysLists the public keys (RSA/DSA) that can be used for logging in as this user.The format of this file is described in the.Xr sshd 8manual page.In the simplest form the format is the same as the.Pa .pubidentity files.This file is not highly sensitive, but the recommendedpermissions are read/write for the user, and not accessible by others..It Pa /etc/ssh/ssh_known_hostsSystemwide list of known host keys.This file should be prepared by thesystem administrator to contain the public host keys of all machines in theorganization.This file should be world-readable.This file containspublic keys, one per line, in the following format (fields separatedby spaces): system name, public key and optional comment field.When different names are usedfor the same machine, all such names should be listed, separated bycommas.The format is described in the.Xr sshd 8manual page..PpThe canonical system name (as returned by name servers) is used by.Xr sshd 8to verify the client host when logging in; other names are needed because.Nmdoes not convert the user-supplied name to a canonical name beforechecking the key, because someone with access to the name serverswould then be able to fool host authentication..It Pa /etc/ssh/ssh_configSystemwide configuration file.The file format and configuration options are described in.Xr ssh_config 5 ..It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_keyThese three files contain the private parts of the host keysand are used for.Cm RhostsRSAAuthenticationand.Cm HostbasedAuthentication .If the protocol version 1.Cm RhostsRSAAuthenticationmethod is used,.Nmmust be setuid root, since the host key is readable only by root.For protocol version 2,.Nmuses.Xr ssh-keysign 8to access the host keys for.Cm HostbasedAuthentication .This eliminates the requirement that.Nmbe setuid root when that authentication method is used.By default.Nmis not setuid root..It Pa $HOME/.rhostsThis file is used in.Cm RhostsRSAAuthenticationand.Cm HostbasedAuthenticationauthentication to list thehost/user pairs that are permitted to log in.(Note that this file isalso used by rlogin and rsh, which makes using this file insecure.)Each line of the file contains a host name (in the canonical formreturned by name servers), and then a user name on that host,separated by a space.On some machines this file may need to beworld-readable if the user's home directory is on a NFS partition,because.Xr sshd 8reads it as root.Additionally, this file must be owned by the user,and must not have write permissions for anyone else.The recommendedpermission for most machines is read/write for the user, and notaccessible by others..PpNote that.Xr sshd 8allows authentication only in combination with client host keyauthentication before permitting log in.If the server machine does not have the client's host key in.Pa /etc/ssh/ssh_known_hosts ,it can be stored in.Pa $HOME/.ssh/known_hosts .The easiest way to do this is toconnect back to the client from the server machine using ssh; thiswill automatically add the host key to.Pa $HOME/.ssh/known_hosts ..It Pa $HOME/.shostsThis file is used exactly the same way as.Pa .rhosts .The purpose forhaving this file is to be able to use.Cm RhostsRSAAuthenticationand.Cm HostbasedAuthenticationauthentication without permitting login with.Xr rloginor.Xr rsh 1 ..It Pa /etc/hosts.equivThis file is used during.Cm RhostsRSAAuthenticationand.Cm HostbasedAuthenticationauthentication.It containscanonical hosts names, one per line (the full format is described in the.Xr sshd 8manual page).If the client host is found in this file, login isautomatically permitted provided client and server user names are thesame.Additionally, successful client host key authentication is required.This file should only be writable by root..It Pa /etc/shosts.equivThis file is processed exactly as.Pa /etc/hosts.equiv .This file may be useful to permit logins using.Nmbut not using rsh/rlogin..It Pa /etc/ssh/sshrcCommands in this file are executed by.Nmwhen the user logs in just before the user's shell (or command) is started.See the.Xr sshd 8manual page for more information..It Pa $HOME/.ssh/rcCommands in this file are executed by.Nmwhen the user logs in just before the user's shell (or command) isstarted.See the.Xr sshd 8manual page for more information..It Pa $HOME/.ssh/environmentContains additional definitions for environment variables, see section.Sx ENVIRONMENTabove..El.Sh DIAGNOSTICS.Nmexits with the exit status of the remote command or with 255if an error occurred..Sh SEE ALSO.Xr gzip 1 ,.Xr rsh 1 ,.Xr scp 1 ,.Xr sftp 1 ,.Xr ssh-add 1 ,.Xr ssh-agent 1 ,.Xr ssh-keygen 1 ,.Xr telnet 1 ,.Xr hosts.equiv 5 ,.Xr ssh_config 5 ,.Xr ssh-keysign 8 ,.Xr sshd 8.Rs.%A T. Ylonen.%A T. Kivinen.%A M. Saarinen.%A T. Rinne.%A S. Lehtinen.%T "SSH Protocol Architecture".%N draft-ietf-secsh-architecture-12.txt.%D January 2002.%O work in progress material.Re.Sh AUTHORSOpenSSH is a derivative of the original and freessh 1.2.12 release by Tatu Ylonen.Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,Theo de Raadt and Dug Songremoved many bugs, re-added newer features andcreated OpenSSH.Markus Friedl contributed the support for SSHprotocol versions 1.5 and 2.0.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -