|
|
|
|
|||||||||||
Past club events:
UHACC @ Penguicon
Club Pages:
ISU chapter: ISUnix
Projects:Club Documents:
Our Guiding Principles
|
SFTP How To:First, what is SFTP? SFTP is part of the SSH suite. The SFTP acronym stands for Secure File Transfer Protocol. Additionaly, the OpenSSH suite also includes the SSH program which replaces rlogin and telnet, and the SCP program which replaces rcp. The daemon included is SSHD, which is the server side of the package. Other basic utilities included are SSH-ADD, SSH-AGENT, SSH-KEYGEN, and SFTP-SERVER. Like it's unsecured brother, FTP, SFTP's general purpose is to exchange files between a server and client. OpenSSH supports SSH protocol versions 1.3, 1.5, and 2.0. So, does UHACC support FTP, SFTP, and SCP? No. Only the SFTP/SCP protocols Considering the security threats concerning the plain text FTP protocol, UHACC's official file transfer is SFTP. How do I SFTP to UHACC? The suggested way of connecting to UHACC from the command line is to use the following format: (shellprompt)$ sftp [username]@uhacc.org Like many other application layer protocols and depending on the OS you are using, SFTP has both command line and GUI interfaces SFTP is normally thought of as an intractive application/protocal, but also can be put into a batch mode with the -b flag. This can be specified with a file or can be directed stdin from an external script. The password can not be passed by either process. sftp [-1Cv] [-b batchfile] [-F SSH_config] [-o SSH_option] [-s subsystem | sftp_server] [-S program] host sftp [[user@]host[:file [file]]] sftp [[user@]host[:dir[/]]] But mostly SFTP is an interactive file transfer program, as mentioned earlier very similar to FTP, which performs all operations over an encrypted SSH transport. Below is an example of some noted differences: With FTP one might try to copy up all their JPG files to their image directory like this: ftp> cd /home/user/images/ftp> bin ftp> prompt ftp> mput *.jpg With SFTP it is much simpler.. sftp> cd /home/user/images/sftp> put *.jpg List of SFTP commands (SFTP will abort if any of the following commands fail):
List of other commands:
SFTP may also use many features of SSH, such as public key authentication and compression. SFTP connects and logs into the specified host, then enters an interactive command mode. The second usage format will retrieve files automatically if a noninteractive authentication method is used; otherwise it will do so after successful interactive authentication. The last usage format allows the sftp client to start in a remote directory. What about the flags that SFTP uses? The options are as follows: -1 Specify the use of protocol version 1. -b batchfile Batch mode reads a series of commands from an input batchfile instead of stdin. Since it lacks user interaction it should be used in conjunction with non-interactive authentication. -C Enables compression (via SSH's -C flag). -F SSH_config Specifies an alternative per-user configuration file for SSH. This option is directly passed to SSH. -o SSH_option Can be used to pass options to SSH in the format used in the SSH configuration file. This is useful for specifying options for which there is no separate sftp command-line flag. For example, to specify an alternate port use: sftp -oPort=26 (UHACC used to use this port config). -s subsystem | sftp_server Specifies the SSH2 subsystem or the path for an sftp server on the remote host. A path is useful for using sftp over protocol version 1, or when the remote SSHd does not have an sftp subsystem configured. -S program Name of the program to use for the encrypted connection. The program must understand SSH options. -v Raise logging level. This option is also passed to SSH. Once in interactive mode, sftp understands a set of commands similar to those of ftp. Commands are case insensitive and pathnames may be enclosed in quotes if they contain spaces. -P If the flag is specified, then the file's full permission and access time are copied too. |
|
|||||||||
|
[Home] [Acceptable Usage] [Privacy Policy] [Downloads] [LDP Mirror] [Member's Sites] [Archives]
Copyright © 2006: Unix Hobbyists' Administrators' & Coders' Club. All Rights Reserved.
|
|||||||||||