diff options
Diffstat (limited to 'sftp.0')
-rw-r--r-- | sftp.0 | 181 |
1 files changed, 181 insertions, 0 deletions
@@ -0,0 +1,181 @@ | |||
1 | SFTP(1) OpenBSD Reference 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 | 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 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 | -b batchfile | ||
34 | Batch mode reads a series of commands from an input batchfile in- | ||
35 | stead of stdin. Since it lacks user interaction it should be | ||
36 | used in conjunction with non-interactive authentication. sftp | ||
37 | will abort if any of the following commands fail: get, put, | ||
38 | rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp, | ||
39 | lpwd and lmkdir. Termination on error can be suppressed on a | ||
40 | command by command basis by prefixing the command with a `-' | ||
41 | character (for example, -rm /tmp/blah*). | ||
42 | |||
43 | -o ssh_option | ||
44 | Can be used to pass options to ssh in the format used in | ||
45 | ssh_config(5). This is useful for specifying options for which | ||
46 | there is no separate sftp command-line flag. For example, to | ||
47 | specify an alternate port use: sftp -oPort=24. | ||
48 | |||
49 | -s subsystem | sftp_server | ||
50 | Specifies the SSH2 subsystem or the path for an sftp server on | ||
51 | the remote host. A path is useful for using sftp over protocol | ||
52 | version 1, or when the remote sshd(8) does not have an sftp sub- | ||
53 | system configured. | ||
54 | |||
55 | -v Raise logging level. This option is also passed to ssh. | ||
56 | |||
57 | -B buffer_size | ||
58 | Specify the size of the buffer that sftp uses when transferring | ||
59 | files. Larger buffers require fewer round trips at the cost of | ||
60 | higher memory consumption. The default is 32768 bytes. | ||
61 | |||
62 | -C Enables compression (via ssh's -C flag). | ||
63 | |||
64 | -F ssh_config | ||
65 | Specifies an alternative per-user configuration file for ssh(1). | ||
66 | This option is directly passed to ssh(1). | ||
67 | |||
68 | -P sftp_server path | ||
69 | Connect directly to a local sftp server (rather than via ssh(1)) | ||
70 | This option may be useful in debugging the client and server. | ||
71 | |||
72 | -R num_requests | ||
73 | Specify how many requests may be outstanding at any one time. | ||
74 | Increasing this may slightly improve file transfer speed but will | ||
75 | increase memory usage. The default is 16 outstanding requests. | ||
76 | |||
77 | -S program | ||
78 | Name of the program to use for the encrypted connection. The | ||
79 | program must understand ssh(1) options. | ||
80 | |||
81 | -1 Specify the use of protocol version 1. | ||
82 | |||
83 | INTERACTIVE COMMANDS | ||
84 | Once in interactive mode, sftp understands a set of commands similar to | ||
85 | those of ftp(1). Commands are case insensitive and pathnames may be en- | ||
86 | closed in quotes if they contain spaces. | ||
87 | |||
88 | bye Quit sftp. | ||
89 | |||
90 | cd path | ||
91 | Change remote directory to path. | ||
92 | |||
93 | lcd path | ||
94 | Change local directory to path. | ||
95 | |||
96 | chgrp grp path | ||
97 | Change group of file path to grp. grp must be a numeric GID. | ||
98 | |||
99 | chmod mode path | ||
100 | Change permissions of file path to mode. | ||
101 | |||
102 | chown own path | ||
103 | Change owner of file path to own. own must be a numeric UID. | ||
104 | |||
105 | exit Quit sftp. | ||
106 | |||
107 | get [flags] remote-path [local-path] | ||
108 | Retrieve the remote-path and store it on the local machine. If | ||
109 | the local path name is not specified, it is given the same name | ||
110 | it has on the remote machine. If the -P flag is specified, then | ||
111 | the file's full permission and access time are copied too. | ||
112 | |||
113 | help Display help text. | ||
114 | |||
115 | lls [ls-options [path]] | ||
116 | Display local directory listing of either path or current direc- | ||
117 | tory if path is not specified. | ||
118 | |||
119 | lmkdir path | ||
120 | Create local directory specified by path. | ||
121 | |||
122 | ln oldpath newpath | ||
123 | Create a symbolic link from oldpath to newpath. | ||
124 | |||
125 | lpwd Print local working directory. | ||
126 | |||
127 | ls [flags] [path] | ||
128 | Display remote directory listing of either path or current direc- | ||
129 | tory if path is not specified. If the -l flag is specified, then | ||
130 | display additional details including permissions and ownership | ||
131 | information. | ||
132 | |||
133 | lumask umask | ||
134 | Set local umask to umask. | ||
135 | |||
136 | mkdir path | ||
137 | Create remote directory specified by path. | ||
138 | |||
139 | progress | ||
140 | Toggle display of progress meter. | ||
141 | |||
142 | put [flags] local-path [remote-path] | ||
143 | Upload local-path and store it on the remote machine. If the re- | ||
144 | mote path name is not specified, it is given the same name it has | ||
145 | on the local machine. If the -P flag is specified, then the | ||
146 | file's full permission and access time are copied too. | ||
147 | |||
148 | pwd Display remote working directory. | ||
149 | |||
150 | quit Quit sftp. | ||
151 | |||
152 | rename oldpath newpath | ||
153 | Rename remote file from oldpath to newpath. | ||
154 | |||
155 | rmdir path | ||
156 | Remove remote directory specified by path. | ||
157 | |||
158 | rm path | ||
159 | Delete remote file specified by path. | ||
160 | |||
161 | symlink oldpath newpath | ||
162 | Create a symbolic link from oldpath to newpath. | ||
163 | |||
164 | version | ||
165 | Display the sftp protocol version. | ||
166 | |||
167 | ! command | ||
168 | Execute command in local shell. | ||
169 | |||
170 | ! Escape to local shell. | ||
171 | |||
172 | ? Synonym for help. | ||
173 | |||
174 | SEE ALSO | ||
175 | scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8), | ||
176 | sshd(8) | ||
177 | |||
178 | T. Ylonen, and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- | ||
179 | filexfer-00.txt, January 2001, work in progress material. | ||
180 | |||
181 | OpenBSD 3.4 February 4, 2001 3 | ||