summaryrefslogtreecommitdiff
path: root/sftp.0
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-01-04 12:58:23 +0000
committerColin Watson <cjwatson@debian.org>2005-01-04 12:58:23 +0000
commitebd2ce335af5861020c79fddb1ae35c03bf036cf (patch)
treeec008b93c62e3241ab611d8c949ebc92905c66b4 /sftp.0
parente17cc75fe35f62ba52928b5889b5e7aadb62bedb (diff)
parent16f1d21ea191deaaeeba719d01c0ad82aa044653 (diff)
Import OpenSSH 3.9p1.
Diffstat (limited to 'sftp.0')
-rw-r--r--sftp.0232
1 files changed, 232 insertions, 0 deletions
diff --git a/sftp.0 b/sftp.0
new file mode 100644
index 000000000..746a410f2
--- /dev/null
+++ b/sftp.0
@@ -0,0 +1,232 @@
1SFTP(1) OpenBSD Reference Manual SFTP(1)
2
3NAME
4 sftp - secure file transfer program
5
6SYNOPSIS
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
14DESCRIPTION
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 the sftp client to start in a remote direc-
26 tory.
27
28 The final usage format allows for automated sessions using the -b option.
29 In such cases, it is usually necessary to configure public key authenti-
30 cation to obviate the need to enter a password at connection time (see
31 sshd(8) and ssh-keygen(1) for details). The options are as follows:
32
33 -1 Specify the use of protocol version 1.
34
35 -B buffer_size
36 Specify the size of the buffer that sftp uses when transferring
37 files. Larger buffers require fewer round trips at the cost of
38 higher memory consumption. The default is 32768 bytes.
39
40 -b batchfile
41 Batch mode reads a series of commands from an input batchfile in-
42 stead of stdin. Since it lacks user interaction it should be
43 used in conjunction with non-interactive authentication. A
44 batchfile of `-' may be used to indicate standard input. sftp
45 will abort if any of the following commands fail: get, put,
46 rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
47 lpwd and lmkdir. Termination on error can be suppressed on a
48 command by command basis by prefixing the command with a `-'
49 character (for example, -rm /tmp/blah*).
50
51 -C Enables compression (via ssh's -C flag).
52
53 -F ssh_config
54 Specifies an alternative per-user configuration file for ssh(1).
55 This option is directly passed to ssh(1).
56
57 -o ssh_option
58 Can be used to pass options to ssh in the format used in
59 ssh_config(5). This is useful for specifying options for which
60 there is no separate sftp command-line flag. For example, to
61 specify an alternate port use: sftp -oPort=24. For full details
62 of the options listed below, and their possible values, see
63 ssh_config(5).
64
65 AddressFamily
66 BatchMode
67 BindAddress
68 ChallengeResponseAuthentication
69 CheckHostIP
70 Cipher
71 Ciphers
72 Compression
73 CompressionLevel
74 ConnectionAttempts
75 ConnectTimeout
76 ControlMaster
77 ControlPath
78 GlobalKnownHostsFile
79 GSSAPIAuthentication
80 GSSAPIDelegateCredentials
81 Host
82 HostbasedAuthentication
83 HostKeyAlgorithms
84 HostKeyAlias
85 HostName
86 IdentityFile
87 IdentitiesOnly
88 LogLevel
89 MACs
90 NoHostAuthenticationForLocalhost
91 NumberOfPasswordPrompts
92 PasswordAuthentication
93 Port
94 PreferredAuthentications
95 Protocol
96 ProxyCommand
97 PubkeyAuthentication
98 RhostsRSAAuthentication
99 RSAAuthentication
100 SendEnv
101 ServerAliveInterval
102 ServerAliveCountMax
103 SmartcardDevice
104 StrictHostKeyChecking
105 TCPKeepAlive
106 UsePrivilegedPort
107 User
108 UserKnownHostsFile
109 VerifyHostKeyDNS
110
111 -P sftp_server_path
112 Connect directly to a local sftp server (rather than via ssh(1))
113 This option may be useful in debugging the client and server.
114
115 -R num_requests
116 Specify how many requests may be outstanding at any one time.
117 Increasing this may slightly improve file transfer speed but will
118 increase memory usage. The default is 16 outstanding requests.
119
120 -S program
121 Name of the program to use for the encrypted connection. The
122 program must understand ssh(1) options.
123
124 -s subsystem | sftp_server
125 Specifies the SSH2 subsystem or the path for an sftp server on
126 the remote host. A path is useful for using sftp over protocol
127 version 1, or when the remote sshd(8) does not have an sftp sub-
128 system configured.
129
130 -v Raise logging level. This option is also passed to ssh.
131
132INTERACTIVE COMMANDS
133 Once in interactive mode, sftp understands a set of commands similar to
134 those of ftp(1). Commands are case insensitive and pathnames may be en-
135 closed in quotes if they contain spaces.
136
137 bye Quit sftp.
138
139 cd path Change remote directory to path.
140
141 chgrp grp path
142 Change group of file path to grp. grp must be a numeric GID.
143
144 chmod mode path
145 Change permissions of file path to mode.
146
147 chown own path
148 Change owner of file path to own. own must be a numeric UID.
149
150 exit Quit sftp.
151
152 get [flags] remote-path [local-path]
153 Retrieve the remote-path and store it on the local machine.
154 If the local path name is not specified, it is given the same
155 name it has on the remote machine. If the -P flag is speci-
156 fied, then the file's full permission and access time are
157 copied too.
158
159 help Display help text.
160
161 lcd path Change local directory to path.
162
163 lls [ls-options [path]]
164 Display local directory listing of either path or current di-
165 rectory if path is not specified.
166
167 lmkdir path
168 Create local directory specified by path.
169
170 ln oldpath newpath
171 Create a symbolic link from oldpath to newpath.
172
173 lpwd Print local working directory.
174
175 ls [flags] [path]
176 Display remote directory listing of either path or current
177 directory if path is not specified. If the -l flag is speci-
178 fied, then display additional details including permissions
179 and ownership information. The -n flag will produce a long
180 listing with user and group information presented numerical-
181 ly.
182
183 By default, ls listings are sorted in lexicographical order.
184 This may be changed by specifying the -S (sort by file size),
185 -t (sort by last modification time), or -f (don't sort at
186 all) flags. Additionally, the sort order may be reversed us-
187 ing the -r flag.
188
189 lumask umask
190 Set local umask to umask.
191
192 mkdir path Create remote directory specified by path.
193
194 progress Toggle display of progress meter.
195
196 put [flags] local-path [remote-path]
197 Upload local-path and store it on the remote machine. If the
198 remote path name is not specified, it is given the same name
199 it has on the local machine. If the -P flag is specified,
200 then the file's full permission and access time are copied
201 too.
202
203 pwd Display remote working directory.
204
205 quit Quit sftp.
206
207 rename oldpath newpath
208 Rename remote file from oldpath to newpath.
209
210 rm path Delete remote file specified by path.
211
212 rmdir path Remove remote directory specified by path.
213
214 symlink oldpath newpath
215 Create a symbolic link from oldpath to newpath.
216
217 version Display the sftp protocol version.
218
219 ! command Execute command in local shell.
220
221 ! Escape to local shell.
222
223 ? Synonym for help.
224
225SEE ALSO
226 ftp(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5),
227 sftp-server(8), sshd(8)
228
229 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
230 filexfer-00.txt, January 2001, work in progress material.
231
232OpenBSD 3.6 February 4, 2001 4