-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathssh.Rd
66 lines (57 loc) · 2.19 KB
/
ssh.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect.R
\name{ssh_connect}
\alias{ssh_connect}
\alias{ssh}
\alias{ssh_session_info}
\alias{ssh_info}
\alias{ssh_disconnect}
\alias{libssh_version}
\title{SSH Client}
\usage{
ssh_connect(host, keyfile = NULL, passwd = askpass, verbose = FALSE)
ssh_session_info(session)
ssh_disconnect(session)
libssh_version()
}
\arguments{
\item{host}{an ssh server string of the form \verb{[user@]hostname[:@port]}. An ipv6
hostname should be wrapped in brackets like this: \verb{[2001:db8::1]:80}.}
\item{keyfile}{path to private key file. Must be in OpenSSH format (see details)}
\item{passwd}{either a string or a callback function for password prompt}
\item{verbose}{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.}
\item{session}{ssh connection created with \code{\link[=ssh_connect]{ssh_connect()}}}
}
\description{
Create an ssh session using \code{ssh_connect()}. The session can be used to execute
commands, scp files or setup a tunnel.
}
\details{
The client first tries to authenticate using a private key, either from ssh-agent
or \verb{/.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
\code{passwd} parameter can be used to provide a passphrase or a callback function to
ask prompt the user for the passphrase when needed.
The session will automatically be disconnected when the session object is removed
or when R exits but you can also use \code{\link[=ssh_disconnect]{ssh_disconnect()}}.
\strong{Windows users:} the private key must be in OpenSSH PEM format. If you open it in
a text editor the first line must be: \verb{-----BEGIN RSA PRIVATE KEY-----}.
To convert a Putty PKK key, open it in the \emph{PuttyGen} utility and go to
\emph{Conversions -> Export OpenSSH}.
}
\examples{
\dontrun{
session <- ssh_connect("dev.opencpu.org")
ssh_exec_wait(session, command = "whoami")
ssh_disconnect(session)
}
}
\seealso{
Other ssh:
\code{\link{scp}},
\code{\link{ssh_credentials}},
\code{\link{ssh_exec}},
\code{\link{ssh_tunnel}()}
}
\concept{ssh}