]> andersk Git - openssh.git/blame - sftp.1
- (djm) Convert mandoc manpages to man automatically. Patch from Mark D.
[openssh.git] / sftp.1
CommitLineData
edeeab1e 1.\" $OpenBSD: sftp.1,v 1.15 2001/04/12 23:17:54 mouring Exp $
61e96248 2.\"
f3c7c613 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
61e96248 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.\"
317611b5 25.Dd February 4, 2001
61e96248 26.Dt SFTP 1
27.Os
28.Sh NAME
29.Nm sftp
e68225b2 30.Nd Secure file transfer program
61e96248 31.Sh SYNOPSIS
32.Nm sftp
0426a3b4 33.Op Fl vC
a5ec8a3d 34.Op Fl b Ar batchfile
61e96248 35.Op Fl o Ar ssh_option
edeeab1e 36.Op Ar host
37.Nm sftp
38.Op [\fIuser\fR@]\fIhost\fR[:\fIfile\fR [\fIfile\fR]]
39.Nm sftp
40.Op [\fIuser\fR@]\fIhost\fR[:\fIdir\fR[\fI/\fR]]
61e96248 41.Sh DESCRIPTION
42.Nm
43is an interactive file transfer program, similar to
44.Xr ftp 1 ,
45which performs all operations over an encrypted
46.Xr ssh 1
47transport.
48It may also use many features of ssh, such as public key authentication and
49compression.
50.Nm
51connects and logs into the specified
0426a3b4 52.Ar hostname ,
61e96248 53then enters an interactive command mode.
54.Pp
edeeab1e 55The second usage format will fetch files automaticly if a non-interactive
56authentication is used, else it do so after an interactive authenication
57is used.
58.Pp
59The last usage format allows the sftp client to start in a remote directory.
60.Pp
61e96248 61The options are as follows:
62.Bl -tag -width Ds
a5ec8a3d 63.It Fl b Ar batchfile
64Batch mode reads a series of commands from an input
acf06a60 65.Ar batchfile
a5ec8a3d 66instead of
acf06a60 67.Em stdin .
68Since it lacks user interaction it should be used in conjunction with
69non-interactive authentication.
70.Nm
71will abort if any of the following
a5ec8a3d 72commands fail:
acf06a60 73.Ic get , put , rename , ln , rm , mkdir , chdir , lchdir
a5ec8a3d 74and
acf06a60 75.Ic lmkdir .
17910dce 76.It Fl C
77Enables compression (via ssh's
78.Fl C
79flag)
61e96248 80.It Fl o Ar ssh_option
81Specify an option to be directly passed to
82.Xr ssh 1 .
17910dce 83.It Fl v
84Raise logging level. This option is also passed to ssh.
61e96248 85.El
86.Sh INTERACTIVE COMMANDS
0426a3b4 87Once in interactive mode,
88.Nm
61e96248 89understands a set of commands similar to those of
90.Xr ftp 1 .
a0e6fead 91Commands are case insensitive and pathnames may be enclosed in quotes if they
92contain spaces.
61e96248 93.Bl -tag -width Ds
0426a3b4 94.It Ic cd Ar path
61e96248 95Change remote directory to
0426a3b4 96.Ar path .
97.It Ic lcd Ar path
61e96248 98Change local directory to
0426a3b4 99.Ar path .
100.It Ic chgrp Ar grp Ar path
61e96248 101Change group of file
0426a3b4 102.Ar path
103to
61e96248 104.Ar grp .
105.Ar grp
0426a3b4 106must be a numeric GID.
107.It Ic chmod Ar mode Ar path
61e96248 108Change permissions of file
0426a3b4 109.Ar path
110to
111.Ar mode .
112.It Ic chown Ar own Ar path
61e96248 113Change owner of file
0426a3b4 114.Ar path
115to
61e96248 116.Ar own .
117.Ar own
118must be a numeric UID.
17910dce 119.It Ic exit
120Quit sftp.
58c54a79 121.It Xo Ic get
122.Op Ar flags
123.Ar remote-path
124.Op Ar local-path
125.Xc
61e96248 126Retrieve the
0426a3b4 127.Ar remote-path
61e96248 128and store it on the local machine.
129If the local
0426a3b4 130path name is not specified, it is given the same name it has on the
58c54a79 131remote machine. If the
132.Fl P
133flag is specified, then the file's full permission and access time are
134copied too.
17910dce 135.It Ic help
136Display help text.
0426a3b4 137.It Ic lls Op Ar ls-options Op Ar path
61e96248 138Display local directory listing of either
139.Ar path
140or current directory if
141.Ar path
0426a3b4 142is not specified.
143.It Ic lmkdir Ar path
61e96248 144Create local directory specified by
0426a3b4 145.Ar path .
3a7fe5ba 146.It Ic ln Ar oldpath Ar newpath
147Create a symbolic link from
148.Ar oldpath
149to
150.Ar newpath .
0426a3b4 151.It Ic lpwd
152Print local working directory.
153.It Ic ls Op Ar path
61e96248 154Display remote directory listing of either
155.Ar path
0426a3b4 156or current directory if
157.Ar path
158is not specified.
159.It Ic lumask Ar umask
61e96248 160Set local umask to
0426a3b4 161.Ar umask .
162.It Ic mkdir Ar path
61e96248 163Create remote directory specified by
0426a3b4 164.Ar path .
58c54a79 165.It Xo Ic put
166.Op Ar flags
167.Ar local-path
168.Op Ar local-path
169.Xc
61e96248 170Upload
0426a3b4 171.Ar local-path
3a7fe5ba 172and store it on the remote machine. If the remote path name is not
173specified, it is given the same name it has on the local machine. If the
58c54a79 174.Fl P
175flag is specified, then the file's full permission and access time are
176copied too.
0426a3b4 177.It Ic pwd
178Display remote working directory.
0426a3b4 179.It Ic quit
180Quit sftp.
181.It Ic rename Ar oldpath Ar newpath
61e96248 182Rename remote file from
183.Ar oldpath
184to
0426a3b4 185.Ar newpath .
186.It Ic rmdir Ar path
61e96248 187Remove remote directory specified by
0426a3b4 188.Ar path .
189.It Ic rm Ar path
61e96248 190Delete remote file specified by
0426a3b4 191.Ar path .
3a7fe5ba 192.It Ic symlink Ar oldpath Ar newpath
193Create a symbolic link from
194.Ar oldpath
195to
196.Ar newpath .
61e96248 197.It Ic ! Ar command
198Execute
199.Ar command
0426a3b4 200in local shell.
61e96248 201.It Ic !
0426a3b4 202Escape to local shell.
203.It Ic ?
204Synonym for help.
205.El
61e96248 206.Sh AUTHORS
207Damien Miller <djm@mindrot.org>
208.Sh SEE ALSO
209.Xr ssh 1 ,
acf06a60 210.Xr sftp-server 8 ,
61e96248 211.Xr ssh-add 1 ,
212.Xr ssh-keygen 1 ,
0426a3b4 213.Xr sshd 8 ,
214.Xr scp 1
215
This page took 0.097437 seconds and 5 git commands to generate.