sftp_connect | R Documentation |
sftp_connect
outputs a list which is used as an argument to all other
functions of the sftp package. Recommended practice is to store the output as
sftp_con
since that is the object name all other sftp functions look
for by default. IMPORTANT! Your password MUST NOT contain the colon
character ("") or the at-sign ("@
") since these characters
have special use as delimiters in the connection string!
sftp_connect( server = "", folder = "", username = "", password = "", protocol = "sftp://", port = 22 )
server |
The SFTP server URL, hostname, or IP address |
folder |
The path to the folder where you want to operate; can be a
single folder name in the SFTP root or a path with subfolders, e.g.
|
username |
The SFTP account username. It is recommended to not store
your username in any script, but instead create an snvironment variable and
call it using |
password |
The SFTP account password. It is recommended to not store
your password in any script, but instead create an environment variable and
call it using |
protocol |
Default is |
port |
Default is |
A list of strings which are used by all other sftp_*
functions
when connecting to an SFTP server.
Other sftp:
sftp_changedir()
,
sftp_delete()
,
sftp_download()
,
sftp_listdirs()
,
sftp_listfiles()
,
sftp_list()
,
sftp_makedir()
,
sftp_removedir()
,
sftp_rename()
,
sftp_upload()
## Not run: # Minimal - rely on defaults sftp_con <- sftp_connect( username = Sys.getenv("MY_SFTP_USER"), password = Sys.getenv("MY_SFTP_PASS") ) # Explicit sftp_con <- sftp_connect( server = "mysftp.com", folder = "myfolder", username = Sys.getenv("MY_SFTP_USER"), password = Sys.getenv("MY_SFTP_PASS"), protocol = "sftp://", port = 22 ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.