 |
Index for Section 1 |
|
 |
Alphabetical listing for S |
|
 |
Bottom of page |
|
sftp2(1)
NAME
sftp2, sftp - Secure Shell client remote copy application
SYNOPSIS
sftp2 [-D debug_level_spec] [-b batchfile] [-S path] [-h] [-V] [user@] host
[port #]
OPTIONS
-D debug_level_spec
Prints debug information to stderr. The debug_level_spec argument can
be a number between 0 and 99, where 99 specifies that all debug
information should be displayed, or a comma-separated list of
assignments; for example, ModulePattern=debug_level where ModulePattern
is sftp2 for the main sftp2 application.
-b batchfile
Reads commands from a file instead of standard input. Because this mode
is intended for scripts or cron jobs, the sftp2 command will not try to
interact with the user, which means that only the passwordless
authentication methods will work. In batch mode, a failure to change
the current working directory will cause the sftp2 command to abort.
Other errors are ignored.
-S path
Specifies the path to the ssh2 binary.
-h Displays help.
-V Displays the Secure Shell version number.
OPERANDS
user
Specifies the user name to use when connecting (optional).
host
Specifies the system to connect to.
port
Specifies the port on the system to connect to (optional).
DESCRIPTION
The sftp2 command securely copies files between a Secure Shell client and
server. The sftp2 command is intended as a secure replacement for the ftp
command.
When the user enters the sftp2 command, the client establishes a session
with the server and must prove the user's identity to the server by using
an authentication method, which can be password authentication, public key
authentication, or host based authentication. (See the
AllowedAuthentications keyword in ssh2_config(4) for more information.)
When the user's identity has been accepted by the server, the server
executes the command. All communication will be automatically encrypted.
The session terminates when the command completes.
COMMANDS
When the sftp2 command is ready to accept commands, it will display a
prompt:
sftp>
The user can then enter any of the following commands:
open hostname
Tries to connect to a system specified in hostname.
localopen
Opens a local connection. The connection is created without connecting
to an sshd2 daemon. This is intended for debugging and testing.
close
Closes the current session.
quit
Quits the application.
cd directory
Changes the current remote working directory.
lcd directory
Changes the current local working directory.
pwd Displays the name of the current remote working directory.
lpwd
Displays the name of the current local working directory.
ls [-R ] [ -l ] [ file ... ]
Lists the names of the files on the remote system. For directories, the
contents of the directory are listed. When the -R option is specified,
the directory trees are listed recursively. (By default, the
subdirectories of the argument directories are not visited.) When the
-l option is specified, permissions, owners, sizes, and modification
times are also shown. When no arguments are given, it is assumed that
the contents of the current directory are being listed. Currently the
options -R and -l are mutually incompatible.
lls [-R ] [ -l ] [ file ... ]
Same as the ls command, but operates on local files.
get [file ... ]
Transfers the specified files from the remote system to the local
system. Directories are recursively copied with their contents.
mget [file ... ]
Synonymous to the get command.
put [file ... ]
Transfers the specified files from the local system to the remote
system. Directories are recursively copied with their contents.
mput [file ... ]
Synonymous to the put command.
rename source target
Renames the file source to target.
lrename source target
Same as the rename command, but operates on local files.
rm file
Deletes the file specified in file.
lrm file
Same as the rm command, but operates on local files.
mkdir directory
Creates the directory specified in directory.
lmkdir directory
Same as the mkdir command, but operates on local files.
rmdir directory
Deletes the directory specified in directory.
lrmdir directory
Same as the rmdir command, but operates on local files.
help [ topic ]
If topic is not given, lists the available topics. If topic is given,
displays the online help for that topic.
COMMAND INTERPRETATION
The sftp2 command understands both backslashes and quotation marks on the
command line. A backslash preceding a character can be used to ignore the
character in the command-line interpretation. Quotation marks can be used
for specifying file names with spaces.
The ls, lls, get, and put commands support globbing patterns (wildcards).
See sshregex(5) for more information about globbing patterns.
The command-line processing and globbing use the backslash ( \ ) as an
escape character. If you want to use a backslash to escape the
metacharacters in the globbing, you have to precede the backslash with
another backslash ( \\ ) to escape its special meaning in the command-line
processing.
The get . command or the put . command will get or put every file in the
current directory and will overwrite files with the same file name.
COMMAND-LINE EDITING
The following key sequences can be used for command-line editing:
Ctrl-Space
Set the mark.
Ctrl-A
Go to the beginning of the line.
Ctrl-B
Move the cursor one character to the left.
Ctrl-D
Erase the character on the right of the cursor, or exit the program if
the command line is empty.
Ctrl-E
Go to the end of the line.
Ctrl-F
Move the cursor one character to the right.
Ctrl-H
Backspace.
Ctrl-I
Tab.
Ctrl-J or Ctrl-M
Enter.
Ctrl-K
Delete to the end of the line.
Ctrl-L
Redraw the line.
Ctrl-N
Move to the next line.
Ctrl-P
Move to the previous line.
Ctrl-T
Toggle two characters.
Ctrl-U
Delete the line.
Ctrl-W
Delete a region. The region's end is marked with Ctrl-Space.
Ctrl-X
Begin an extended command.
Ctrl-Y
Yank the deleted line.
Ctrl-_ or Ctrl-X U
Undo.
Ctrl-X Ctrl-L
Lowercase the region.
Ctrl-X Ctrl-U
Uppercase the region.
Ctrl-X Ctrl-X
Exchange the cursor and the mark.
Ctrl-X H
Mark the whole buffer.
Esc Ctrl-H or Esc Delete
Backwards word-delete.
Esc Space or Esc
Delete extra spaces (leaves only one space).
Esc <
Go to the beginning of the line.
Esc >
Go to the end of the line.
Esc @
Mark the current word.
Esc A
Go one sentence backwards.
Esc B
Go one word backwards.
Esc C
Capitalize the current word.
Esc D
Delete the current word.
Esc E
Go one sentence forwards.
Esc F
Go one word forwards.
Esc K
Delete the current sentence.
Esc L
Lowercase the current word.
Esc T
Transpose words.
Esc U
Uppercase the current word.
Delete
Backspace.
LEGAL NOTICES
SSH is a registered trademark of SSH Communication Security Ltd.
SEE ALSO
Commands: scp2(1), ssh2(1), ssh-agent2(1), ssh-add2(1), sshd2(8)
 |
Index for Section 1 |
|
 |
Alphabetical listing for S |
|
 |
Top of page |
|