sftp
Description
Connect to an SFTP server by calling the sftp function, which
creates an SFTP connection object. To access a particular SFTP account on the server, specify
a host and a user. Then, use the SFTP object to upload, download, and delete files. You also
can create, delete, and navigate to different folders on the server. To close the connection,
use the close function.
Because SFTP is a secure protocol, the SFTP object encrypts your username, your password, and any data you download from or upload to an SFTP server.
Creation
Syntax
Description
s = sftp(
uses the specified private key file.host,user,PrivateKeyFile=privatekeyfile)
s = sftp(
uses the specified private key file and associated passphrase.host,user,PrivateKeyFile=privatekeyfile,PrivateKeyPassphrase=passphrase)
s = sftp(
uses the specified public and private key files.host,user,PublicKeyFile=publickeyfile,PrivateKeyFile=privatekeyfile)
s = sftp(
uses the specified public and private key files as well as private key passphrase.host,user,PublicKeyFile=publickeyfile,PrivateKeyFile=privatekeyfile,PrivateKeyPassphrase=passphrase)
s = sftp(___,
specifies options using one or more name-value arguments in addition to any of the input
argument combinations in previous syntaxes. For example, you can specify the value of
Name=Value)ServerSystem as "Windows" to connect to an SFTP
server that runs on a Windows® operating system.
Input Arguments
Name-Value Arguments
Object Functions
cd | Change or view current folder on SFTP or FTP server |
close | Close connection to SFTP or FTP server |
delete | Delete file on SFTP or FTP server |
dir | List folder contents on SFTP or FTP server |
mget | Download files from SFTP or FTP server |
mkdir | Make new folder on SFTP or FTP server |
mput | Upload file or folder to SFTP or FTP server |
rename | Rename file on SFTP or FTP server |
rmdir | Remove folder on SFTP or FTP server |
Examples
Limitations
The SFTP object does not support proxy server settings.