]>
Commit | Line | Data |
---|---|---|
1 | .\" $OpenBSD: sftp.1,v 1.12 2001/03/07 10:11:23 djm Exp $ | |
2 | .\" | |
3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. | |
4 | .\" | |
5 | .\" Redistribution and use in source and binary forms, with or without | |
6 | .\" modification, are permitted provided that the following conditions | |
7 | .\" are met: | |
8 | .\" 1. Redistributions of source code must retain the above copyright | |
9 | .\" notice, this list of conditions and the following disclaimer. | |
10 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer in the | |
12 | .\" documentation and/or other materials provided with the distribution. | |
13 | .\" | |
14 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
15 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
16 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
17 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
18 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
19 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
20 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
21 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
24 | .\" | |
25 | .Dd Febuary 4, 2001 | |
26 | .Dt SFTP 1 | |
27 | .Os | |
28 | .Sh NAME | |
29 | .Nm sftp | |
30 | .Nd Secure file transfer program | |
31 | .Sh SYNOPSIS | |
32 | .Nm sftp | |
33 | .Op Fl vC | |
34 | .Op Fl b Ar batchfile | |
35 | .Op Fl o Ar ssh_option | |
36 | .Op Ar hostname | user@hostname | |
37 | .Sh DESCRIPTION | |
38 | .Nm | |
39 | is an interactive file transfer program, similar to | |
40 | .Xr ftp 1 , | |
41 | which performs all operations over an encrypted | |
42 | .Xr ssh 1 | |
43 | transport. | |
44 | It may also use many features of ssh, such as public key authentication and | |
45 | compression. | |
46 | .Nm | |
47 | connects and logs into the specified | |
48 | .Ar hostname , | |
49 | then enters an interactive command mode. | |
50 | .Pp | |
51 | The options are as follows: | |
52 | .Bl -tag -width Ds | |
53 | .It Fl b Ar batchfile | |
54 | Batch mode reads a series of commands from an input | |
55 | .Fn batchfile | |
56 | instead of | |
57 | .Fn stdin . | |
58 | Since it lacks user interaction it should be used in conjuction with a | |
59 | non-interactive authentication. Sftp will abort if any of the following | |
60 | commands fail: | |
61 | .Pa get, put, rename, ln, rm, mkdir, chdir, lchdir | |
62 | and | |
63 | .Pa lmkdir. | |
64 | .It Fl C | |
65 | Enables compression (via ssh's | |
66 | .Fl C | |
67 | flag) | |
68 | .It Fl o Ar ssh_option | |
69 | Specify an option to be directly passed to | |
70 | .Xr ssh 1 . | |
71 | .It Fl v | |
72 | Raise logging level. This option is also passed to ssh. | |
73 | .El | |
74 | .Sh INTERACTIVE COMMANDS | |
75 | Once in interactive mode, | |
76 | .Nm | |
77 | understands a set of commands similar to those of | |
78 | .Xr ftp 1 . | |
79 | Commands are case insensitive and pathnames may be enclosed in quotes if they | |
80 | contain spaces. | |
81 | .Bl -tag -width Ds | |
82 | .It Ic cd Ar path | |
83 | Change remote directory to | |
84 | .Ar path . | |
85 | .It Ic lcd Ar path | |
86 | Change local directory to | |
87 | .Ar path . | |
88 | .It Ic chgrp Ar grp Ar path | |
89 | Change group of file | |
90 | .Ar path | |
91 | to | |
92 | .Ar grp . | |
93 | .Ar grp | |
94 | must be a numeric GID. | |
95 | .It Ic chmod Ar mode Ar path | |
96 | Change permissions of file | |
97 | .Ar path | |
98 | to | |
99 | .Ar mode . | |
100 | .It Ic chown Ar own Ar path | |
101 | Change owner of file | |
102 | .Ar path | |
103 | to | |
104 | .Ar own . | |
105 | .Ar own | |
106 | must be a numeric UID. | |
107 | .It Ic exit | |
108 | Quit sftp. | |
109 | .It Xo Ic get | |
110 | .Op Ar flags | |
111 | .Ar remote-path | |
112 | .Op Ar local-path | |
113 | .Xc | |
114 | Retrieve the | |
115 | .Ar remote-path | |
116 | and store it on the local machine. | |
117 | If the local | |
118 | path name is not specified, it is given the same name it has on the | |
119 | remote machine. If the | |
120 | .Fl P | |
121 | flag is specified, then the file's full permission and access time are | |
122 | copied too. | |
123 | .It Ic help | |
124 | Display help text. | |
125 | .It Ic lls Op Ar ls-options Op Ar path | |
126 | Display local directory listing of either | |
127 | .Ar path | |
128 | or current directory if | |
129 | .Ar path | |
130 | is not specified. | |
131 | .It Ic lmkdir Ar path | |
132 | Create local directory specified by | |
133 | .Ar path . | |
134 | .It Ic ln Ar oldpath Ar newpath | |
135 | Create a symbolic link from | |
136 | .Ar oldpath | |
137 | to | |
138 | .Ar newpath . | |
139 | .It Ic lpwd | |
140 | Print local working directory. | |
141 | .It Ic ls Op Ar path | |
142 | Display remote directory listing of either | |
143 | .Ar path | |
144 | or current directory if | |
145 | .Ar path | |
146 | is not specified. | |
147 | .It Ic lumask Ar umask | |
148 | Set local umask to | |
149 | .Ar umask . | |
150 | .It Ic mkdir Ar path | |
151 | Create remote directory specified by | |
152 | .Ar path . | |
153 | .It Xo Ic put | |
154 | .Op Ar flags | |
155 | .Ar local-path | |
156 | .Op Ar local-path | |
157 | .Xc | |
158 | Upload | |
159 | .Ar local-path | |
160 | and store it on the remote machine. If the remote path name is not | |
161 | specified, it is given the same name it has on the local machine. If the | |
162 | .Fl P | |
163 | flag is specified, then the file's full permission and access time are | |
164 | copied too. | |
165 | .It Ic pwd | |
166 | Display remote working directory. | |
167 | .It Ic quit | |
168 | Quit sftp. | |
169 | .It Ic rename Ar oldpath Ar newpath | |
170 | Rename remote file from | |
171 | .Ar oldpath | |
172 | to | |
173 | .Ar newpath . | |
174 | .It Ic rmdir Ar path | |
175 | Remove remote directory specified by | |
176 | .Ar path . | |
177 | .It Ic rm Ar path | |
178 | Delete remote file specified by | |
179 | .Ar path . | |
180 | .It Ic symlink Ar oldpath Ar newpath | |
181 | Create a symbolic link from | |
182 | .Ar oldpath | |
183 | to | |
184 | .Ar newpath . | |
185 | .It Ic ! Ar command | |
186 | Execute | |
187 | .Ar command | |
188 | in local shell. | |
189 | .It Ic ! | |
190 | Escape to local shell. | |
191 | .It Ic ? | |
192 | Synonym for help. | |
193 | .El | |
194 | .Sh AUTHORS | |
195 | Damien Miller <djm@mindrot.org> | |
196 | .Sh SEE ALSO | |
197 | .Xr ssh 1 , | |
198 | .Xr ssh-add 1 , | |
199 | .Xr ssh-keygen 1 , | |
200 | .Xr sshd 8 , | |
201 | .Xr scp 1 | |
202 |