summaryrefslogtreecommitdiff
path: root/sftp.0
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-09-01 18:42:19 +0000
committerColin Watson <cjwatson@debian.org>2003-09-01 18:42:19 +0000
commit8d6b7f4c46de3feb66f704ab483e51ea1a3bb0e1 (patch)
tree41fe3dd71501bbec5b0393f1536c925eaee180e9 /sftp.0
parentf045c69060bfdd5cf8759a5f29d7008d02e4de5b (diff)
parent58bfa257481a1c6938ada9bbd38801cc45633fb0 (diff)
Debian release 3.6p1-1.
Diffstat (limited to 'sftp.0')
-rw-r--r--sftp.0201
1 files changed, 105 insertions, 96 deletions
diff --git a/sftp.0 b/sftp.0
index d0c6086ba..1680e489c 100644
--- a/sftp.0
+++ b/sftp.0
@@ -1,171 +1,180 @@
1SFTP(1) System General Commands Manual SFTP(1) 1SFTP(1) BSD General Commands Manual SFTP(1)
2 2
3NAME 3^[[1mNAME^[[0m
4 sftp - Secure file transfer program 4 ^[[1msftp ^[[22mM-bMM-^R Secure file transfer program
5 5
6SYNOPSIS 6^[[1mSYNOPSIS^[[0m
7 sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server] 7 ^[[1msftp ^[[22m[^[[1mM-bMM-^RvC1^[[22m] [^[[1mM-bMM-^Rb ^[[4m^[[22mbatchfile^[[24m] [^[[1mM-bMM-^Ro ^[[4m^[[22mssh_option^[[24m] [^[[1mM-bMM-^Rs ^[[4m^[[22msubsystem^[[24m | ^[[4msftp_server^[[24m]
8 [-B buffer_size] [-F ssh_config] [-P sftp_server path] 8 [^[[1mM-bMM-^RB ^[[4m^[[22mbuffer_size^[[24m] [^[[1mM-bMM-^RF ^[[4m^[[22mssh_config^[[24m] [^[[1mM-bMM-^RP ^[[4m^[[22msftp_server^[[24m ^[[4mpath^[[24m]
9 [-R num_requests] [-S program] host 9 [^[[1mM-bMM-^RR ^[[4m^[[22mnum_requests^[[24m] [^[[1mM-bMM-^RS ^[[4m^[[22mprogram^[[24m] ^[[4mhost^[[0m
10 sftp [[user@]host[:file [file]]] 10 ^[[1msftp ^[[22m[[^[[4muser^[[24m@]^[[4mhost^[[24m[:^[[4mfile^[[24m [^[[4mfile^[[24m]]]
11 sftp [[user@]host[:dir[/]]] 11 ^[[1msftp ^[[22m[[^[[4muser^[[24m@]^[[4mhost^[[24m[:^[[4mdir^[[24m[^[[4m/^[[24m]]]
12 12
13DESCRIPTION 13^[[1mDESCRIPTION^[[0m
14 sftp is an interactive file transfer program, similar to ftp(1), which 14 ^[[1msftp ^[[22mis an interactive file transfer program, similar to ftp(1), which
15 performs all operations over an encrypted ssh(1) transport. It may also 15 performs all operations over an encrypted ssh(1) transport. It may also
16 use many features of ssh, such as public key authentication and compresM-- 16 use many features of ssh, such as public key authentication and compresM-bM-^@M-^P
17 sion. sftp connects and logs into the specified host, then enters an 17 sion. ^[[1msftp ^[[22mconnects and logs into the specified ^[[4mhost^[[24m, then enters an
18 interactive command mode. 18 interactive command mode.
19 19
20 The second usage format will retrieve files automatically if a non-interM-- 20 The second usage format will retrieve files automatically if a nonM-bM-^@M-^PinterM-bM-^@M-^P
21 active authentication method is used; otherwise it will do so after sucM-- 21 active authentication method is used; otherwise it will do so after sucM-bM-^@M-^P
22 cessful interactive authentication. 22 cessful interactive authentication.
23 23
24 The last usage format allows the sftp client to start in a remote direcM-- 24 The last usage format allows the sftp client to start in a remote direcM-bM-^@M-^P
25 tory. 25 tory.
26 26
27 The options are as follows: 27 The options are as follows:
28 28
29 -b batchfile 29 ^[[1mM-bMM-^Rb ^[[4m^[[22mbatchfile^[[0m
30 Batch mode reads a series of commands from an input batchfile 30 Batch mode reads a series of commands from an input ^[[4mbatchfile^[[0m
31 instead of stdin. Since it lacks user interaction it should be 31 instead of ^[[4mstdin^[[24m. Since it lacks user interaction it should be
32 used in conjunction with non-interactive authentication. sftp 32 used in conjunction with nonM-bM-^@M-^Pinteractive authentication. ^[[1msftp^[[0m
33 will abort if any of the following commands fail: get, put, 33 will abort if any of the following commands fail: ^[[1mget^[[22m, ^[[1mput^[[22m,
34 rename, ln, rm, mkdir, chdir, lchdir and lmkdir. 34 ^[[1mrename^[[22m, ^[[1mln^[[22m, ^[[1mrm^[[22m, ^[[1mmkdir^[[22m, ^[[1mchdir^[[22m, ^[[1mls^[[22m, ^[[1mlchdir^[[22m, ^[[1mchmod^[[22m, ^[[1mchown^[[22m, ^[[1mchgrp^[[22m,
35 35 ^[[1mlpwd ^[[22mand ^[[1mlmkdir^[[22m. Termination on error can be suppressed on a
36 -o ssh_option 36 command by command basis by prefixing the command with a ^[[1mM-bM-^@M-^YM-bM-^@M-^PM-bM-^@M-^Y^[[0m
37 Can be used to pass options to ssh in the format used in 37 character (For example, ^[[1mM-bM-^@M-^Prm /tmp/blah* ^[[22m).
38
39 ^[[1mM-bMM-^Ro ^[[4m^[[22mssh_option^[[0m
40 Can be used to pass options to ^[[1mssh ^[[22min the format used in
38 ssh_config(5). This is useful for specifying options for which 41 ssh_config(5). This is useful for specifying options for which
39 there is no separate sftp command-line flag. For example, to 42 there is no separate ^[[1msftp ^[[22mcommandM-bM-^@M-^Pline flag. For example, to
40 specify an alternate port use: sftp -oPort=24. 43 specify an alternate port use: ^[[1msftp M-bM-^@M-^PoPort=24^[[22m.
41 44
42 -s subsystem | sftp_server 45 ^[[1mM-bMM-^Rs ^[[4m^[[22msubsystem^[[24m | ^[[4msftp_server^[[0m
43 Specifies the SSH2 subsystem or the path for an sftp server on 46 Specifies the SSH2 subsystem or the path for an sftp server on
44 the remote host. A path is useful for using sftp over protocol 47 the remote host. A path is useful for using sftp over protocol
45 version 1, or when the remote sshd does not have an sftp subsysM-- 48 version 1, or when the remote ^[[1msshd ^[[22mdoes not have an sftp subsysM-bM-^@M-^P
46 tem configured. 49 tem configured.
47 50
48 -v Raise logging level. This option is also passed to ssh. 51 ^[[1mM-bMM-^Rv ^[[22mRaise logging level. This option is also passed to ssh.
49 52
50 -B buffer_size 53 ^[[1mM-bMM-^RB ^[[4m^[[22mbuffer_size^[[0m
51 Specify the size of the buffer that sftp uses when transferring 54 Specify the size of the buffer that ^[[1msftp ^[[22muses when transferring
52 files. Larger buffers require fewer round trips at the cost of 55 files. Larger buffers require fewer round trips at the cost of
53 higher memory consumption. The default is 32768 bytes. 56 higher memory consumption. The default is 32768 bytes.
54 57
55 -C Enables compression (via ssh's -C flag). 58 ^[[1mM-bMM-^RC ^[[22mEnables compression (via sshM-bM-^@M-^Ys ^[[1mM-bMM-^RC ^[[22mflag).
56 59
57 -F ssh_config 60 ^[[1mM-bMM-^RF ^[[4m^[[22mssh_config^[[0m
58 Specifies an alternative per-user configuration file for ssh. 61 Specifies an alternative perM-bM-^@M-^Puser configuration file for ^[[1mssh^[[22m.
59 This option is directly passed to ssh(1). 62 This option is directly passed to ssh(1).
60 63
61 -P sftp_server path 64 ^[[1mM-bMM-^RP ^[[4m^[[22msftp_server^[[24m ^[[4mpath^[[0m
62 Connect directly to a local sftp-server (rather than via ssh) 65 Connect directly to a local ^[[1msftpM-bM-^@M-^Pserver ^[[22m(rather than via ^[[1mssh^[[22m)
63 This option may be useful in debugging the client and server. 66 This option may be useful in debugging the client and server.
64 67
65 -R num_requests 68 ^[[1mM-bMM-^RR ^[[4m^[[22mnum_requests^[[0m
66 Specify how many requests may be outstanding at any one time. 69 Specify how many requests may be outstanding at any one time.
67 Increasing this may slightly improve file transfer speed but will 70 Increasing this may slightly improve file transfer speed but will
68 increase memory usage. The default is 16 outstanding requests. 71 increase memory usage. The default is 16 outstanding requests.
69 72
70 -S program 73 ^[[1mM-bMM-^RS ^[[4m^[[22mprogram^[[0m
71 Name of the program to use for the encrypted connection. The 74 Name of the ^[[4mprogram^[[24m to use for the encrypted connection. The
72 program must understand ssh(1) options. 75 program must understand ssh(1) options.
73 76
74 -1 Specify the use of protocol version 1. 77 ^[[1mM-bMM-^R1 ^[[22mSpecify the use of protocol version 1.
75 78
76INTERACTIVE COMMANDS 79^[[1mINTERACTIVE COMMANDS^[[0m
77 Once in interactive mode, sftp understands a set of commands similar to 80 Once in interactive mode, ^[[1msftp ^[[22munderstands a set of commands similar to
78 those of ftp(1). Commands are case insensitive and pathnames may be 81 those of ftp(1). Commands are case insensitive and pathnames may be
79 enclosed in quotes if they contain spaces. 82 enclosed in quotes if they contain spaces.
80 83
81 bye Quit sftp. 84 ^[[1mbye ^[[22mQuit sftp.
82 85
83 cd path 86 ^[[1mcd ^[[4m^[[22mpath^[[0m
84 Change remote directory to path. 87 Change remote directory to ^[[4mpath^[[24m.
85 88
86 lcd path 89 ^[[1mlcd ^[[4m^[[22mpath^[[0m
87 Change local directory to path. 90 Change local directory to ^[[4mpath^[[24m.
88 91
89 chgrp grp path 92 ^[[1mchgrp ^[[4m^[[22mgrp^[[24m ^[[4mpath^[[0m
90 Change group of file path to grp. grp must be a numeric GID. 93 Change group of file ^[[4mpath^[[24m to ^[[4mgrp^[[24m. ^[[4mgrp^[[24m must be a numeric GID.
91 94
92 chmod mode path 95 ^[[1mchmod ^[[4m^[[22mmode^[[24m ^[[4mpath^[[0m
93 Change permissions of file path to mode. 96 Change permissions of file ^[[4mpath^[[24m to ^[[4mmode^[[24m.
94 97
95 chown own path 98 ^[[1mchown ^[[4m^[[22mown^[[24m ^[[4mpath^[[0m
96 Change owner of file path to own. own must be a numeric UID. 99 Change owner of file ^[[4mpath^[[24m to ^[[4mown^[[24m. ^[[4mown^[[24m must be a numeric UID.
97 100
98 exit Quit sftp. 101 ^[[1mexit ^[[22mQuit sftp.
99 102
100 get [flags] remote-path [local-path] 103 ^[[1mget ^[[22m[^[[4mflags^[[24m] ^[[4mremoteM-bM-^@M-^Ppath^[[24m [^[[4mlocalM-bM-^@M-^Ppath^[[24m]
101 Retrieve the remote-path and store it on the local machine. If 104 Retrieve the ^[[4mremoteM-bM-^@M-^Ppath^[[24m and store it on the local machine. If
102 the local path name is not specified, it is given the same name 105 the local path name is not specified, it is given the same name
103 it has on the remote machine. If the -P flag is specified, then 106 it has on the remote machine. If the ^[[1mM-bMM-^RP ^[[22mflag is specified, then
104 the file's full permission and access time are copied too. 107 the fileM-bM-^@M-^Ys full permission and access time are copied too.
105 108
106 help Display help text. 109 ^[[1mhelp ^[[22mDisplay help text.
107 110
108 lls [ls-options [path]] 111 ^[[1mlls ^[[22m[^[[4mlsM-bM-^@M-^Poptions^[[24m [^[[4mpath^[[24m]]
109 Display local directory listing of either path or current direcM-- 112 Display local directory listing of either ^[[4mpath^[[24m or current direcM-bM-^@M-^P
110 tory if path is not specified. 113 tory if ^[[4mpath^[[24m is not specified.
111 114
112 lmkdir path 115 ^[[1mlmkdir ^[[4m^[[22mpath^[[0m
113 Create local directory specified by path. 116 Create local directory specified by ^[[4mpath^[[24m.
114 117
115 ln oldpath newpath 118 ^[[1mln ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
116 Create a symbolic link from oldpath to newpath. 119 Create a symbolic link from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
117 120
118 lpwd Print local working directory. 121 ^[[1mlpwd ^[[22mPrint local working directory.
119 122
120 ls [flags] [path] 123 ^[[1mls ^[[22m[^[[4mflags^[[24m] [^[[4mpath^[[24m]
121 Display remote directory listing of either path or current direcM-- 124 Display remote directory listing of either ^[[4mpath^[[24m or current direcM-bM-^@M-^P
122 tory if path is not specified. If the -l flag is specified, then 125 tory if ^[[4mpath^[[24m is not specified. If the ^[[1mM-bMM-^Rl ^[[22mflag is specified, then
123 display additional details including permissions and ownership 126 display additional details including permissions and ownership
124 information. 127 information.
125 128
126 lumask umask 129 ^[[1mlumask ^[[4m^[[22mumask^[[0m
127 Set local umask to umask. 130 Set local umask to ^[[4mumask^[[24m.
131
132 ^[[1mmkdir ^[[4m^[[22mpath^[[0m
133 Create remote directory specified by ^[[4mpath^[[24m.
128 134
129 mkdir path 135 ^[[1mprogress^[[0m
130 Create remote directory specified by path. 136 Toggle display of progress meter.
131 137
132 put [flags] local-path [local-path] 138 ^[[1mput ^[[22m[^[[4mflags^[[24m] ^[[4mlocalM-bM-^@M-^Ppath^[[24m [^[[4mremoteM-bM-^@M-^Ppath^[[24m]
133 Upload local-path and store it on the remote machine. If the 139 Upload ^[[4mlocalM-bM-^@M-^Ppath^[[24m and store it on the remote machine. If the
134 remote path name is not specified, it is given the same name it 140 remote path name is not specified, it is given the same name it
135 has on the local machine. If the -P flag is specified, then the 141 has on the local machine. If the ^[[1mM-bMM-^RP ^[[22mflag is specified, then the
136 file's full permission and access time are copied too. 142 fileM-bM-^@M-^Ys full permission and access time are copied too.
143
144 ^[[1mpwd ^[[22mDisplay remote working directory.
137 145
138 pwd Display remote working directory. 146 ^[[1mquit ^[[22mQuit sftp.
139 147
140 quit Quit sftp. 148 ^[[1mrename ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
149 Rename remote file from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
141 150
142 rename oldpath newpath 151 ^[[1mrmdir ^[[4m^[[22mpath^[[0m
143 Rename remote file from oldpath to newpath. 152 Remove remote directory specified by ^[[4mpath^[[24m.
144 153
145 rmdir path 154 ^[[1mrm ^[[4m^[[22mpath^[[0m
146 Remove remote directory specified by path. 155 Delete remote file specified by ^[[4mpath^[[24m.
147 156
148 rm path 157 ^[[1msymlink ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
149 Delete remote file specified by path. 158 Create a symbolic link from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
150 159
151 symlink oldpath newpath 160 ^[[1mversion^[[0m
152 Create a symbolic link from oldpath to newpath. 161 Display the ^[[1msftp ^[[22mprotocol version.
153 162
154 ! command 163 ! ^[[4mcommand^[[0m
155 Execute command in local shell. 164 Execute ^[[4mcommand^[[24m in local shell.
156 165
157 ! Escape to local shell. 166 ! Escape to local shell.
158 167
159 ? Synonym for help. 168 ? Synonym for help.
160 169
161AUTHORS 170^[[1mAUTHORS^[[0m
162 Damien Miller <djm@mindrot.org> 171 Damien Miller <djm@mindrot.org>
163 172
164SEE ALSO 173^[[1mSEE ALSO^[[0m
165 scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8), 174 scp(1), ssh(1), sshM-bM-^@M-^Padd(1), sshM-bM-^@M-^Pkeygen(1), ssh_config(5), sftpM-bM-^@M-^Pserver(8),
166 sshd(8) 175 sshd(8)
167 176
168 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- 177 T. Ylonen and S. Lehtinen, ^[[4mSSH^[[24m ^[[4mFile^[[24m ^[[4mTransfer^[[24m ^[[4mProtocol^[[24m, draftM-bM-^@M-^PietfM-bM-^@M-^PsecshM-bM-^@M-^P
169 filexfer-00.txt, January 2001, work in progress material. 178 filexferM-bM-^@M-^P00.txt, January 2001, work in progress material.
170 179
171BSD February 4, 2001 BSD 180BSD February 4, 2001 BSD