Package ssh. June 4, 2018

Similar documents
Package spelling. December 18, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package robotstxt. November 12, 2017

Package messaging. May 27, 2018

Package pdfsearch. July 10, 2018

Package pbdrpc. February 2, 2018

Package cloudml. June 12, 2018

Package calpassapi. August 25, 2018

Package knitrprogressbar

Package ezknitr. September 16, 2016

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package goodpractice

Package validara. October 19, 2017

Package gtrendsr. August 4, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package rcmdcheck. R topics documented: November 10, 2018

Package googlecomputeenginer

Package SEMrushR. November 3, 2018

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package GetoptLong. June 10, 2018

Package docxtools. July 6, 2018

Package githubinstall

Package callr. August 29, 2016

Package WordR. September 7, 2017

Package internetarchive

Package fastdummies. January 8, 2018

Package msgtools. March 2, 2017

Package redux. May 31, 2018

Package rwars. January 14, 2017

Package remoter. August 29, 2016

Package kirby21.base

Package spark. July 21, 2017

Package essurvey. August 23, 2018

Package wdman. January 23, 2017

Package condusco. November 8, 2017

Bitnami Apache Solr for Huawei Enterprise Cloud

Package workflowr. July 6, 2018

Package wikitaxa. December 21, 2017

Package remotes. December 21, 2017

Package ECctmc. May 1, 2018

Package barcoder. October 26, 2018

Package gifti. February 1, 2018

Package testit. R topics documented: June 14, 2018

Package V8. April 25, 2017

Package modules. July 22, 2017

Package kdtools. April 26, 2018

Package liftr. R topics documented: May 14, Type Package

Package oec. R topics documented: May 11, Type Package

Package algorithmia. September 13, 2016

Package tiler. June 9, 2018

SSH Extension and Terminal Widget User Guide. Version 1.0

Bitnami JRuby for Huawei Enterprise Cloud

Package datasets.load

Package tabulizer. June 7, 2018

Package fitbitscraper

Package librarian. R topics documented:

Package reticulate. November 24, 2017

Cryptography Application : SSH. Cyber Security & Network Security March, 2017 Dhaka, Bangladesh

Package loggit. April 9, 2018

Package crossword.r. January 19, 2018

Package WhiteStripe. April 19, 2018

Package pmatch. October 19, 2018

Package statsdk. September 30, 2017

Package cronr. March 3, 2017

Package dkanr. July 12, 2018

Package postal. July 27, 2018

Package shinytest. May 7, 2018

Package semver. January 6, 2017

Package stapler. November 27, 2017

Package catchr. R topics documented: December 30, Type Package. Title Catch, Collect, and Raise Conditions. Version 0.1.0

Package rnaturalearth

Package bigqueryr. October 23, 2017

If you prefer to use your own SSH client, configure NG Admin with the path to the executable:

Package AdhereR. June 15, 2018

Siemens PLM Software. HEEDS MDO Setting up a Windows-to- Linux Compute Resource.

Package reportr. October 6, 2016

SSH. What is Safely 6/19/ June 2018 PacNOG 22, Honiara, Solomon Islands Supported by:

Package nmslibr. April 14, 2018

Package fastqcr. April 11, 2017

Package snakecase. R topics documented: March 25, Version Date Title Convert Strings into any Case

Package crul. October 3, 2017

Package gtrendsr. October 19, 2017

Package farver. November 20, 2018

Package rpostgislt. March 2, 2018

Bitnami MEAN for Huawei Enterprise Cloud

LAB :: Secure SHell (SSL)

TELE301 Lab16 - The Secure Shell

Package knitrbootstrap

Package gridgraphics

Package labelvector. July 28, 2018

Package clipr. June 23, 2018

Package canvasxpress

Package fastrtext. December 10, 2017

Package shinyfeedback

Package IRkernel. January 7, 2019

What is Secure. Authenticated I know who I am talking to. Our communication is Encrypted

Package opencage. January 16, 2018

Package carbonate. R topics documented: October 14, 2018

Package RODBCext. July 31, 2017

Package narray. January 28, 2018

Transcription:

Type Package Title Secure Shell (SSH) Client for R Version 0.2 Author Jeroen Ooms Package ssh June 4, 2018 Maintainer Jeroen Ooms <jeroen@berkeley.edu> Connect to a remote server over SSH to transfer files via SCP, setup a secure tunnel, or run a command or script on the host while streaming stdout and stderr directly to the client. License MIT + file LICENSE Encoding UTF-8 SystemRequirements libssh (the original, not libssh2) RoxygenNote 6.0.1.9000 Imports getpass Suggests knitr, rmarkdown, spelling, sys, testthat, mongolite Language en-gb VignetteBuilder knitr NeedsCompilation yes Repository CRAN Date/Publication 2018-06-04 17:43:04 UTC R topics documented: scp.............................................. 2 ssh_connect......................................... 3 ssh_exec........................................... 4 ssh_tunnel.......................................... 5 Index 6 1

2 scp scp SCP (Secure Copy) Upload and download files to/from the SSH server via the scp protocol. Directories in the files argument are automatically traversed and uploaded / downloaded recursively. scp_download(, files, to = ".", verbose = TRUE) scp_upload(, files, to = ".", verbose = TRUE) files to verbose path to files or directory to transfer existing directory on the destination where files will be copied into print progress while copying files Note that the syntax is slightly different from the scp command line tool because the to parameter is always a target directory where all files will be copied into. If to does not exist, it will be created. The files parameter in scp_upload() is vectorised hence all files and directories will be recursively uploaded into the to directory. For scp_download() the files parameter must be a single string which may contain wildcards. The default path to = "." means that files get downloaded to the current working directory and uploaded to the user home directory on the server. Other ssh: ssh_connect, ssh_exec, ssh_tunnel Examples ## Not run: # recursively upload files and directories <- ssh_connect("dev.opencpu.org") files <- c(r.home("doc"), R.home("COPYING")) scp_upload(, files, to = "~/target") # download it back scp_download(, "~/target/*", to = tempdir())

ssh_connect 3 # delete it from the server ssh_exec_wait(, command = "rm -Rf ~/target") ## End(Not run) ssh_connect SSH Client Create an ssh using ssh_connect(). The can be used to execute commands, scp files or setup a tunnel. ssh_connect(host, keyfile = NULL, passwd = askpass, verbose = FALSE) ssh_info() ssh_disconnect() host keyfile passwd verbose an ssh server string of the form [user@]hostname[:@port] path to private key file. Must be in OpenSSH format (see details) either a string or a callback function for password prompt either TRUE/FALSE or a value between 0 and 4 indicating log level: 0: no logging, 1: only warnings, 2: protocol, 3: packets or 4: full stack trace. The client first tries to authenticate using a private key, either from ssh-agent or /.ssh/id_rsa in the user home directory. If this fails it falls back on challenge-response (interactive) and password auth if allowed by the server. The passwd parameter can be used to provide a passphrase or a callback function to ask prompt the user for the passphrase when needed. The will automatically be disconnected when the object is removed or when R exits but you can also use ssh_disconnect(). Windows users: the private key must be in OpenSSH PEM format. If you open it in a text editor the first line must be: -----BEGIN RSA PRIVATE KEY-----. To convert a Putty PKK key, open it in the PuttyGen utility and go to Conversions -> Export OpenSSH. Other ssh: scp, ssh_exec, ssh_tunnel

4 ssh_exec Examples ## Not run: <- ssh_connect("dev.opencpu.org") ssh_exec_wait(, command = "whoami") ssh_disconnect() ## End(Not run) ssh_exec Execute Remote Command Run a command or script on the host while streaming stdout and stderr directly to the client. ssh_exec_wait(, command = "whoami", std_out = stdout(), std_err = stderr()) ssh_exec_internal(, command = "whoami", error = TRUE) command std_out std_err error The command or script to execute callback function, filename, or connection object to handle stdout stream callback function, filename, or connection object to handle stderr stream automatically raise an error if the exit status is non-zero The ssh_exec_wait() function is the remote equivalent of the local sys::exec_wait(). It runs a command or script on the ssh server and streams stdout and stderr to the client to a file or connection. When done it returns the exit status for the remotely executed command. Similarly ssh_exec_internal() is a small wrapper analogous to sys::exec_internal(). It buffers all stdout and stderr output into a raw vector and returns it in a list along with the exit status. By default this function raises an error if the remote command was unsuccessful. Other ssh: scp, ssh_connect, ssh_tunnel

ssh_tunnel 5 Examples ## Not run: <- ssh_connect("dev.opencpu.org") ssh_exec_wait(command = c( 'curl -O https://cran.r-project.org/src/contrib/jsonlite_1.5.tar.gz', 'R CMD check jsonlite_1.5.tar.gz', 'rm -f jsonlite_1.5.tar.gz' )) ## End(Not run) ssh_tunnel Create SSH tunnel Opens a port on your machine and tunnel all traffic to a custom target host via the SSH server, for example to connect with a database server behind a firewall. ssh_tunnel(, port = 5555, target = "rainmaker.wunderground.com:23") port target integer of local port on which to listen for incoming connections string with target host and port to connect to via ssh tunnel This function blocks while the tunnel is active. Use the tunnel by connecting to localhost:5555 from a separate process. Each tunnel can only be used once and will automatically be closed when the client disconnects. It is intended to tunnel a single connection, not as a long running proxy server. Other ssh: scp, ssh_connect, ssh_exec

Index scp, 2, 3 5 scp_download (scp), 2 scp_download(), 2 scp_upload (scp), 2 scp_upload(), 2 ssh (ssh_connect), 3 ssh_connect, 2, 3, 4, 5 ssh_connect(), 2 5 ssh_disconnect (ssh_connect), 3 ssh_disconnect(), 3 ssh_exec, 2, 3, 4, 5 ssh_exec_internal (ssh_exec), 4 ssh_exec_internal(), 4 ssh_exec_wait (ssh_exec), 4 ssh_exec_wait(), 4 ssh_info (ssh_connect), 3 ssh_tunnel, 2 4, 5 sys::exec_internal(), 4 sys::exec_wait(), 4 6