diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
commit | 854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch) | |
tree | 96755f8590acc2146f4b4ef5b5cdba600e5d9353 /sftp.0 | |
parent | fad82e8999e790899083f9e22a1841148d746df6 (diff) | |
parent | 053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff) |
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'sftp.0')
-rw-r--r-- | sftp.0 | 180 |
1 files changed, 180 insertions, 0 deletions
@@ -0,0 +1,180 @@ | |||
1 | SFTP(1) BSD General Commands Manual SFTP(1) | ||
2 | |||
3 | NAME | ||
4 | sftp - Secure file transfer program | ||
5 | |||
6 | SYNOPSIS | ||
7 | sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server] | ||
8 | [-B buffer_size] [-F ssh_config] [-P sftp_server path] | ||
9 | [-R num_requests] [-S program] host | ||
10 | sftp [[user@]host[:file [file]]] | ||
11 | sftp [[user@]host[:dir[/]]] | ||
12 | |||
13 | DESCRIPTION | ||
14 | sftp is an interactive file transfer program, similar to ftp(1), which | ||
15 | performs all operations over an encrypted ssh(1) transport. It may also | ||
16 | use many features of ssh, such as public key authentication and compres- | ||
17 | sion. sftp connects and logs into the specified host, then enters an | ||
18 | interactive command mode. | ||
19 | |||
20 | The second usage format will retrieve files automatically if a non-inter- | ||
21 | active authentication method is used; otherwise it will do so after suc- | ||
22 | cessful interactive authentication. | ||
23 | |||
24 | The last usage format allows the sftp client to start in a remote direc- | ||
25 | tory. | ||
26 | |||
27 | The options are as follows: | ||
28 | |||
29 | -b batchfile | ||
30 | Batch mode reads a series of commands from an input batchfile | ||
31 | instead of stdin. Since it lacks user interaction it should be | ||
32 | used in conjunction with non-interactive authentication. sftp | ||
33 | will abort if any of the following commands fail: get, put, | ||
34 | rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp, | ||
35 | lpwd and lmkdir. Termination on error can be suppressed on a | ||
36 | command by command basis by prefixing the command with a M-bM-^@M-^M-bM-^@M-^Y-M-bM-^@M-^M-bM-^@M-^Y | ||
37 | character (For example, -rm /tmp/blah* ). | ||
38 | |||
39 | -o ssh_option | ||
40 | Can be used to pass options to ssh in the format used in | ||
41 | ssh_config(5). This is useful for specifying options for which | ||
42 | there is no separate sftp command-line flag. For example, to | ||
43 | specify an alternate port use: sftp -oPort=24. | ||
44 | |||
45 | -s subsystem | sftp_server | ||
46 | Specifies the SSH2 subsystem or the path for an sftp server on | ||
47 | the remote host. A path is useful for using sftp over protocol | ||
48 | version 1, or when the remote sshd does not have an sftp subsys- | ||
49 | tem configured. | ||
50 | |||
51 | -v Raise logging level. This option is also passed to ssh. | ||
52 | |||
53 | -B buffer_size | ||
54 | Specify the size of the buffer that sftp uses when transferring | ||
55 | files. Larger buffers require fewer round trips at the cost of | ||
56 | higher memory consumption. The default is 32768 bytes. | ||
57 | |||
58 | -C Enables compression (via sshM-bM-^@M-^Ys -C flag). | ||
59 | |||
60 | -F ssh_config | ||
61 | Specifies an alternative per-user configuration file for ssh. | ||
62 | This option is directly passed to ssh(1). | ||
63 | |||
64 | -P sftp_server path | ||
65 | Connect directly to a local sftp-server (rather than via ssh) | ||
66 | This option may be useful in debugging the client and server. | ||
67 | |||
68 | -R num_requests | ||
69 | Specify how many requests may be outstanding at any one time. | ||
70 | Increasing this may slightly improve file transfer speed but will | ||
71 | increase memory usage. The default is 16 outstanding requests. | ||
72 | |||
73 | -S program | ||
74 | Name of the program to use for the encrypted connection. The | ||
75 | program must understand ssh(1) options. | ||
76 | |||
77 | -1 Specify the use of protocol version 1. | ||
78 | |||
79 | INTERACTIVE COMMANDS | ||
80 | Once in interactive mode, sftp understands a set of commands similar to | ||
81 | those of ftp(1). Commands are case insensitive and pathnames may be | ||
82 | enclosed in quotes if they contain spaces. | ||
83 | |||
84 | bye Quit sftp. | ||
85 | |||
86 | cd path | ||
87 | Change remote directory to path. | ||
88 | |||
89 | lcd path | ||
90 | Change local directory to path. | ||
91 | |||
92 | chgrp grp path | ||
93 | Change group of file path to grp. grp must be a numeric GID. | ||
94 | |||
95 | chmod mode path | ||
96 | Change permissions of file path to mode. | ||
97 | |||
98 | chown own path | ||
99 | Change owner of file path to own. own must be a numeric UID. | ||
100 | |||
101 | exit Quit sftp. | ||
102 | |||
103 | get [flags] remote-path [local-path] | ||
104 | Retrieve the remote-path and store it on the local machine. If | ||
105 | the local path name is not specified, it is given the same name | ||
106 | it has on the remote machine. If the -P flag is specified, then | ||
107 | the fileM-bM-^@M-^Ys full permission and access time are copied too. | ||
108 | |||
109 | help Display help text. | ||
110 | |||
111 | lls [ls-options [path]] | ||
112 | Display local directory listing of either path or current direc- | ||
113 | tory if path is not specified. | ||
114 | |||
115 | lmkdir path | ||
116 | Create local directory specified by path. | ||
117 | |||
118 | ln oldpath newpath | ||
119 | Create a symbolic link from oldpath to newpath. | ||
120 | |||
121 | lpwd Print local working directory. | ||
122 | |||
123 | ls [flags] [path] | ||
124 | Display remote directory listing of either path or current direc- | ||
125 | tory if path is not specified. If the -l flag is specified, then | ||
126 | display additional details including permissions and ownership | ||
127 | information. | ||
128 | |||
129 | lumask umask | ||
130 | Set local umask to umask. | ||
131 | |||
132 | mkdir path | ||
133 | Create remote directory specified by path. | ||
134 | |||
135 | progress | ||
136 | Toggle display of progress meter. | ||
137 | |||
138 | put [flags] local-path [remote-path] | ||
139 | Upload local-path and store it on the remote machine. If the | ||
140 | remote path name is not specified, it is given the same name it | ||
141 | has on the local machine. If the -P flag is specified, then the | ||
142 | fileM-bM-^@M-^Ys full permission and access time are copied too. | ||
143 | |||
144 | pwd Display remote working directory. | ||
145 | |||
146 | quit Quit sftp. | ||
147 | |||
148 | rename oldpath newpath | ||
149 | Rename remote file from oldpath to newpath. | ||
150 | |||
151 | rmdir path | ||
152 | Remove remote directory specified by path. | ||
153 | |||
154 | rm path | ||
155 | Delete remote file specified by path. | ||
156 | |||
157 | symlink oldpath newpath | ||
158 | Create a symbolic link from oldpath to newpath. | ||
159 | |||
160 | version | ||
161 | Display the sftp protocol version. | ||
162 | |||
163 | ! command | ||
164 | Execute command in local shell. | ||
165 | |||
166 | ! Escape to local shell. | ||
167 | |||
168 | ? Synonym for help. | ||
169 | |||
170 | AUTHORS | ||
171 | Damien Miller <djm@mindrot.org> | ||
172 | |||
173 | SEE ALSO | ||
174 | scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8), | ||
175 | sshd(8) | ||
176 | |||
177 | T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- | ||
178 | filexfer-00.txt, January 2001, work in progress material. | ||
179 | |||
180 | BSD February 4, 2001 BSD | ||