1REMCTL_OPEN(3) remctl Library Reference REMCTL_OPEN(3)
2
3
4
6 remctl_open - Connect to a remote remctl server
7
9 #include <remctl.h>
10
11 int remctl_open(struct remctl *r, const char *host,
12 unsigned short port,
13 const char *principal);
14
16 remctl_open() opens a TCP connection to the given host on the given
17 port and then authenticates using the remctl protocol and the service
18 principal principal. r is a remctl struct created via remctl_new().
19 host must not be NULL. If port is 0, the library first attempts to
20 connect to the registered port of 4373 and then tries the legacy port
21 of 4444 if that fails. Future versions of the library will drop this
22 fallback to 4444. If principal is NULL, a service principal of
23 "host/host" in the default local realm is used.
24
25 The remctl protocol uses Kerberos v5 via GSS-API for authentication.
26 The underlying GSS-API library will use the default ticket cache for
27 authentication, so to successfully use remctl_open(), the caller should
28 already have Kerberos tickets for an appropriate realm stored in its
29 default ticket cache. The environment variable KRB5CCNAME can be used
30 to control which ticket cache is used.
31
33 remctl_open() returns true on success and false on failure. On fail‐
34 ure, the caller should call remctl_error() to retrieve the error mes‐
35 sage.
36
38 The default behavior, when a port of 0 is given, of trying 4373 and
39 falling back to 4444 will be removed in a future version of this
40 library in favor of using the "remctl" service in /etc/services if set
41 and then falling back on only 4373. 4444 was the poorly-chosen origi‐
42 nal remctl port and should be phased out.
43
45 The remctl port number, 4373, was derived by tracing the diagonals of a
46 QWERTY keyboard up from the letters "remc" to the number row.
47
49 remctl_new(3), remctl_error(3)
50
51 The current version of the remctl library and complete details of the
52 remctl protocol are available from its web page at
53 <http://www.eyrie.org/~eagle/software/remctl/>.
54
56 Russ Allbery <rra@stanford.edu>
57
58
59
602.11 2007-09-01 REMCTL_OPEN(3)