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