diff options
author | Colin Watson <cjwatson@debian.org> | 2005-05-30 21:44:32 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-05-30 21:44:32 +0000 |
commit | a55bd782aa819b7f5ae716de000f19f4f531850e (patch) | |
tree | 12638b19bc0ed9c8d48541d460693ab0fbb58e89 /sftp.0 | |
parent | fe9489f7e522f780f3fa5c2f28208124d193398c (diff) | |
parent | 5d05471f6657646d1d6500c7c43134462c407ee6 (diff) |
Import OpenSSH 4.1p1.
Diffstat (limited to 'sftp.0')
-rw-r--r-- | sftp.0 | 265 |
1 files changed, 265 insertions, 0 deletions
@@ -0,0 +1,265 @@ | |||
1 | SFTP(1) OpenBSD Reference Manual SFTP(1) | ||
2 | |||
3 | NAME | ||
4 | sftp - secure file transfer program | ||
5 | |||
6 | SYNOPSIS | ||
7 | sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config] | ||
8 | [-o ssh_option] [-P sftp_server_path] [-R num_requests] [-S program] | ||
9 | [-s subsystem | sftp_server] host | ||
10 | sftp [[user@]host[:file [file]]] | ||
11 | sftp [[user@]host[:dir[/]]] | ||
12 | sftp -b batchfile [user@]host | ||
13 | |||
14 | DESCRIPTION | ||
15 | sftp is an interactive file transfer program, similar to ftp(1), which | ||
16 | performs all operations over an encrypted ssh(1) transport. It may also | ||
17 | use many features of ssh, such as public key authentication and compres- | ||
18 | sion. sftp connects and logs into the specified host, then enters an in- | ||
19 | teractive command mode. | ||
20 | |||
21 | The second usage format will retrieve files automatically if a non-inter- | ||
22 | active authentication method is used; otherwise it will do so after suc- | ||
23 | cessful interactive authentication. | ||
24 | |||
25 | The third usage format allows sftp to start in a remote directory. | ||
26 | |||
27 | The final usage format allows for automated sessions using the -b option. | ||
28 | In such cases, it is usually necessary to configure public key authenti- | ||
29 | cation to obviate the need to enter a password at connection time (see | ||
30 | sshd(8) and ssh-keygen(1) for details). The options are as follows: | ||
31 | |||
32 | -1 Specify the use of protocol version 1. | ||
33 | |||
34 | -B buffer_size | ||
35 | Specify the size of the buffer that sftp uses when transferring | ||
36 | files. Larger buffers require fewer round trips at the cost of | ||
37 | higher memory consumption. The default is 32768 bytes. | ||
38 | |||
39 | -b batchfile | ||
40 | Batch mode reads a series of commands from an input batchfile in- | ||
41 | stead of stdin. Since it lacks user interaction it should be | ||
42 | used in conjunction with non-interactive authentication. A | ||
43 | batchfile of `-' may be used to indicate standard input. sftp | ||
44 | will abort if any of the following commands fail: get, put, | ||
45 | rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp, | ||
46 | lpwd and lmkdir. Termination on error can be suppressed on a | ||
47 | command by command basis by prefixing the command with a `-' | ||
48 | character (for example, -rm /tmp/blah*). | ||
49 | |||
50 | -C Enables compression (via ssh's -C flag). | ||
51 | |||
52 | -F ssh_config | ||
53 | Specifies an alternative per-user configuration file for ssh(1). | ||
54 | This option is directly passed to ssh(1). | ||
55 | |||
56 | -o ssh_option | ||
57 | Can be used to pass options to ssh in the format used in | ||
58 | ssh_config(5). This is useful for specifying options for which | ||
59 | there is no separate sftp command-line flag. For example, to | ||
60 | specify an alternate port use: sftp -oPort=24. For full details | ||
61 | of the options listed below, and their possible values, see | ||
62 | ssh_config(5). | ||
63 | |||
64 | AddressFamily | ||
65 | BatchMode | ||
66 | BindAddress | ||
67 | ChallengeResponseAuthentication | ||
68 | CheckHostIP | ||
69 | Cipher | ||
70 | Ciphers | ||
71 | Compression | ||
72 | CompressionLevel | ||
73 | ConnectionAttempts | ||
74 | ConnectTimeout | ||
75 | ControlMaster | ||
76 | ControlPath | ||
77 | GlobalKnownHostsFile | ||
78 | GSSAPIAuthentication | ||
79 | GSSAPIDelegateCredentials | ||
80 | HashKnownHosts | ||
81 | Host | ||
82 | HostbasedAuthentication | ||
83 | HostKeyAlgorithms | ||
84 | HostKeyAlias | ||
85 | HostName | ||
86 | IdentityFile | ||
87 | IdentitiesOnly | ||
88 | KbdInteractiveDevices | ||
89 | LogLevel | ||
90 | MACs | ||
91 | NoHostAuthenticationForLocalhost | ||
92 | NumberOfPasswordPrompts | ||
93 | PasswordAuthentication | ||
94 | Port | ||
95 | PreferredAuthentications | ||
96 | Protocol | ||
97 | ProxyCommand | ||
98 | PubkeyAuthentication | ||
99 | RhostsRSAAuthentication | ||
100 | RSAAuthentication | ||
101 | SendEnv | ||
102 | ServerAliveInterval | ||
103 | ServerAliveCountMax | ||
104 | SmartcardDevice | ||
105 | StrictHostKeyChecking | ||
106 | TCPKeepAlive | ||
107 | UsePrivilegedPort | ||
108 | User | ||
109 | UserKnownHostsFile | ||
110 | VerifyHostKeyDNS | ||
111 | |||
112 | -P sftp_server_path | ||
113 | Connect directly to a local sftp server (rather than via ssh(1)). | ||
114 | This option may be useful in debugging the client and server. | ||
115 | |||
116 | -R num_requests | ||
117 | Specify how many requests may be outstanding at any one time. | ||
118 | Increasing this may slightly improve file transfer speed but will | ||
119 | increase memory usage. The default is 16 outstanding requests. | ||
120 | |||
121 | -S program | ||
122 | Name of the program to use for the encrypted connection. The | ||
123 | program must understand ssh(1) options. | ||
124 | |||
125 | -s subsystem | sftp_server | ||
126 | Specifies the SSH2 subsystem or the path for an sftp server on | ||
127 | the remote host. A path is useful for using sftp over protocol | ||
128 | version 1, or when the remote sshd(8) does not have an sftp sub- | ||
129 | system configured. | ||
130 | |||
131 | -v Raise logging level. This option is also passed to ssh. | ||
132 | |||
133 | INTERACTIVE COMMANDS | ||
134 | Once in interactive mode, sftp understands a set of commands similar to | ||
135 | those of ftp(1). Commands are case insensitive. Pathnames that contain | ||
136 | spaces must be enclosed in quotes. Any special characters contained | ||
137 | within pathnames that are recognized by glob(3) must be escaped with | ||
138 | backslashes (`\'). | ||
139 | |||
140 | bye Quit sftp. | ||
141 | |||
142 | cd path | ||
143 | Change remote directory to path. | ||
144 | |||
145 | chgrp grp path | ||
146 | Change group of file path to grp. path may contain glob(3) char- | ||
147 | acters and may match multiple files. grp must be a numeric GID. | ||
148 | |||
149 | chmod mode path | ||
150 | Change permissions of file path to mode. path may contain | ||
151 | glob(3) characters and may match multiple files. | ||
152 | |||
153 | chown own path | ||
154 | Change owner of file path to own. path may contain glob(3) char- | ||
155 | acters and may match multiple files. own must be a numeric UID. | ||
156 | |||
157 | exit Quit sftp. | ||
158 | |||
159 | get [-P] remote-path [local-path] | ||
160 | Retrieve the remote-path and store it on the local machine. If | ||
161 | the local path name is not specified, it is given the same name | ||
162 | it has on the remote machine. remote-path may contain glob(3) | ||
163 | characters and may match multiple files. If it does and local- | ||
164 | path is specified, then local-path must specify a directory. If | ||
165 | the -P flag is specified, then full file permissions and access | ||
166 | times are copied too. | ||
167 | |||
168 | help Display help text. | ||
169 | |||
170 | lcd path | ||
171 | Change local directory to path. | ||
172 | |||
173 | lls [ls-options [path]] | ||
174 | Display local directory listing of either path or current direc- | ||
175 | tory if path is not specified. ls-options may contain any flags | ||
176 | supported by the local system's ls(1) command. path may contain | ||
177 | glob(3) characters and may match multiple files. | ||
178 | |||
179 | lmkdir path | ||
180 | Create local directory specified by path. | ||
181 | |||
182 | ln oldpath newpath | ||
183 | Create a symbolic link from oldpath to newpath. | ||
184 | |||
185 | lpwd Print local working directory. | ||
186 | |||
187 | ls [-1aflnrSt] [path] | ||
188 | Display a remote directory listing of either path or the current | ||
189 | directory if path is not specified. path may contain glob(3) | ||
190 | characters and may match multiple files. | ||
191 | |||
192 | The following flags are recognized and alter the behaviour of ls | ||
193 | accordingly: | ||
194 | |||
195 | -1 Produce single columnar output. | ||
196 | |||
197 | -a List files beginning with a dot (`.'). | ||
198 | |||
199 | -f Do not sort the listing. The default sort order is lexi- | ||
200 | cographical. | ||
201 | |||
202 | -l Display additional details including permissions and own- | ||
203 | ership information. | ||
204 | |||
205 | -n Produce a long listing with user and group information | ||
206 | presented numerically. | ||
207 | |||
208 | -r Reverse the sort order of the listing. | ||
209 | |||
210 | -S Sort the listing by file size. | ||
211 | |||
212 | -t Sort the listing by last modification time. | ||
213 | |||
214 | lumask umask | ||
215 | Set local umask to umask. | ||
216 | |||
217 | mkdir path | ||
218 | Create remote directory specified by path. | ||
219 | |||
220 | progress | ||
221 | Toggle display of progress meter. | ||
222 | |||
223 | put [-P] local-path [remote-path] | ||
224 | Upload local-path and store it on the remote machine. If the re- | ||
225 | mote path name is not specified, it is given the same name it has | ||
226 | on the local machine. local-path may contain glob(3) characters | ||
227 | and may match multiple files. If it does and remote-path is | ||
228 | specified, then remote-path must specify a directory. If the -P | ||
229 | flag is specified, then the file's full permission and access | ||
230 | time are copied too. | ||
231 | |||
232 | pwd Display remote working directory. | ||
233 | |||
234 | quit Quit sftp. | ||
235 | |||
236 | rename oldpath newpath | ||
237 | Rename remote file from oldpath to newpath. | ||
238 | |||
239 | rm path | ||
240 | Delete remote file specified by path. | ||
241 | |||
242 | rmdir path | ||
243 | Remove remote directory specified by path. | ||
244 | |||
245 | symlink oldpath newpath | ||
246 | Create a symbolic link from oldpath to newpath. | ||
247 | |||
248 | version | ||
249 | Display the sftp protocol version. | ||
250 | |||
251 | ! command | ||
252 | Execute command in local shell. | ||
253 | |||
254 | ! Escape to local shell. | ||
255 | |||
256 | ? Synonym for help. | ||
257 | |||
258 | SEE ALSO | ||
259 | ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3), | ||
260 | ssh_config(5), sftp-server(8), sshd(8) | ||
261 | |||
262 | T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- | ||
263 | filexfer-00.txt, January 2001, work in progress material. | ||
264 | |||
265 | OpenBSD 3.7 February 4, 2001 4 | ||