]> andersk Git - openssh.git/blame - sftp.1
- markus@cvs.openbsd.org 2001/08/14 09:23:02
[openssh.git] / sftp.1
CommitLineData
68874d2b 1.\" $OpenBSD: sftp.1,v 1.22 2001/08/14 09:23:02 markus 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
3730bb22 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
cf7ff074 52.Ar host ,
61e96248 53then enters an interactive command mode.
54.Pp
3730bb22 55The second usage format will retrieve files automatically if a non-interactive
cf7ff074 56authentication method is used; otherwise it will do so after
57successful interactive authentication.
edeeab1e 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
3730bb22 71will abort if any of the following
72commands fail:
acf06a60 73.Ic get , put , rename , ln , rm , mkdir , chdir , lchdir
a5ec8a3d 74and
acf06a60 75.Ic lmkdir .
17910dce 76.It Fl C
3730bb22 77Enables compression (via ssh's
17910dce 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
3730bb22 89understands a set of commands similar to those of
61e96248 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
68874d2b 94.It Ic bye
95Quit sftp.
0426a3b4 96.It Ic cd Ar path
3730bb22 97Change remote directory to
0426a3b4 98.Ar path .
99.It Ic lcd Ar path
3730bb22 100Change local directory to
0426a3b4 101.Ar path .
102.It Ic chgrp Ar grp Ar path
3730bb22 103Change group of file
0426a3b4 104.Ar path
105to
61e96248 106.Ar grp .
107.Ar grp
0426a3b4 108must be a numeric GID.
109.It Ic chmod Ar mode Ar path
3730bb22 110Change permissions of file
0426a3b4 111.Ar path
112to
113.Ar mode .
114.It Ic chown Ar own Ar path
3730bb22 115Change owner of file
0426a3b4 116.Ar path
117to
61e96248 118.Ar own .
119.Ar own
120must be a numeric UID.
17910dce 121.It Ic exit
122Quit sftp.
58c54a79 123.It Xo Ic get
124.Op Ar flags
125.Ar remote-path
126.Op Ar local-path
127.Xc
61e96248 128Retrieve the
0426a3b4 129.Ar remote-path
61e96248 130and store it on the local machine.
131If the local
3730bb22 132path name is not specified, it is given the same name it has on the
133remote machine. If the
58c54a79 134.Fl P
135flag is specified, then the file's full permission and access time are
136copied too.
17910dce 137.It Ic help
138Display help text.
0426a3b4 139.It Ic lls Op Ar ls-options Op Ar path
3730bb22 140Display local directory listing of either
61e96248 141.Ar path
142or current directory if
143.Ar path
0426a3b4 144is not specified.
145.It Ic lmkdir Ar path
61e96248 146Create local directory specified by
0426a3b4 147.Ar path .
3a7fe5ba 148.It Ic ln Ar oldpath Ar newpath
3730bb22 149Create a symbolic link from
3a7fe5ba 150.Ar oldpath
151to
152.Ar newpath .
0426a3b4 153.It Ic lpwd
154Print local working directory.
155.It Ic ls Op Ar path
61e96248 156Display remote directory listing of either
157.Ar path
0426a3b4 158or current directory if
159.Ar path
160is not specified.
161.It Ic lumask Ar umask
3730bb22 162Set local umask to
0426a3b4 163.Ar umask .
164.It Ic mkdir Ar path
61e96248 165Create remote directory specified by
0426a3b4 166.Ar path .
58c54a79 167.It Xo Ic put
168.Op Ar flags
169.Ar local-path
170.Op Ar local-path
171.Xc
61e96248 172Upload
0426a3b4 173.Ar local-path
3730bb22 174and store it on the remote machine. If the remote path name is not
175specified, it is given the same name it has on the local machine. If the
58c54a79 176.Fl P
177flag is specified, then the file's full permission and access time are
178copied too.
0426a3b4 179.It Ic pwd
180Display remote working directory.
0426a3b4 181.It Ic quit
182Quit sftp.
183.It Ic rename Ar oldpath Ar newpath
61e96248 184Rename remote file from
185.Ar oldpath
186to
0426a3b4 187.Ar newpath .
188.It Ic rmdir Ar path
61e96248 189Remove remote directory specified by
0426a3b4 190.Ar path .
191.It Ic rm Ar path
61e96248 192Delete remote file specified by
0426a3b4 193.Ar path .
3a7fe5ba 194.It Ic symlink Ar oldpath Ar newpath
3730bb22 195Create a symbolic link from
3a7fe5ba 196.Ar oldpath
197to
198.Ar newpath .
61e96248 199.It Ic ! Ar command
3730bb22 200Execute
61e96248 201.Ar command
0426a3b4 202in local shell.
61e96248 203.It Ic !
0426a3b4 204Escape to local shell.
205.It Ic ?
206Synonym for help.
207.El
61e96248 208.Sh AUTHORS
209Damien Miller <djm@mindrot.org>
210.Sh SEE ALSO
2cad6cef 211.Xr scp 1 ,
61e96248 212.Xr ssh 1 ,
213.Xr ssh-add 1 ,
214.Xr ssh-keygen 1 ,
2cad6cef 215.Xr sftp-server 8 ,
216.Xr sshd 8
217.Rs
7b518233 218.%A T. Ylonen
219.%A S. Lehtinen
2cad6cef 220.%T "SSH File Transfer Protocol"
221.%N draft-ietf-secsh-filexfer-00.txt
222.%D January 2001
223.%O work in progress material
224.Re
This page took 0.126928 seconds and 5 git commands to generate.