<refentry id="remotectl.8">

  <!--
  This file is part of Cockpit.

  Copyright (C) 2014 Red Hat, Inc.

  Cockpit is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation; either version 2.1 of the License, or
  (at your option) any later version.

  Cockpit is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
  -->

  <refentryinfo>
    <title>remotectl</title>
    <productname>cockpit</productname>
  </refentryinfo>

  <refmeta>
    <refentrytitle>remotectl</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="version"></refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>remotectl</refname>
    <refpurpose>Remote Access Configuration</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>remotectl</command>
      <arg choice="req">COMMAND</arg>
      <arg choice="opt" rep="repeat">OPTIONS</arg>
    </cmdsynopsis>
  </refsynopsisdiv>


  <refsect1 id="remotectl-description">
    <title>DESCRIPTION</title>
    <para>The <command>remotectl</command> program will configure remote access to the system. Currently it manages cockpit's SSL certificate.</para>
  </refsect1>

<refsect1 id="remotectl-commands">
    <title>Commands</title>

    <variablelist>
      <varlistentry>
        <term><command>certificate</command></term>
        <listitem><para>Manage Cockpit's SSL certificate. If used without options will check if cockpit has a valid certificate without making any changes.</para>

        <para>
          <option>--ensure</option> Ensure that a certificate exists and can be loaded. If none exists, create a <code>0-self-signed.cert</code>
            certificate, using <ulink url="https://github.com/sgallagher/sscg">sscg</ulink> (if available) or
            <ulink url="https://linux.die.net/man/1/openssl">openssl</ulink>. That self-signed default certificate will be automatically
            renewed when it expires.
        </para>

        <para>
          <option>--user username</option> The unix user that should own the certificate. Only takes effect if used with <option>--ensure</option>.
        </para>

        <para>
          <option>--group groupname</option> The unix group that should read the certificate. Only takes effect if used with <option>--ensure</option>.
        </para>

        <para>
          If any additional arguments are given, they are treated as files that should be combined to create a certificate file. If the combined files validate, they will be saved in the appropriate location using the name of the first file given with the extension changed to .cert. For example:
        </para>

        <para><command>remotectl certificate server.pem chain.pem key.pem</command></para>

        <para>will result in <literal>server.cert</literal>. If <literal>server.cert</literal> already exists it will be overwritten.
        </para>

      </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="remotectl-options">
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term><option>--help</option></term>
        <listitem>
          <para>
            Show help options.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--verbose</option></term>
        <listitem>
          <para>Print verbose messages about the task</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="remotectl-bugs">
    <title>BUGS</title>
    <para>
      Please send bug reports to either the distribution bug tracker or the
      <ulink url="https://github.com/cockpit-project/cockpit/issues/new">upstream bug tracker</ulink>.
    </para>
  </refsect1>

  <refsect1 id="remotectl-author">
    <title>AUTHOR</title>
    <para>Cockpit has been written by many
      <ulink url="https://github.com/cockpit-project/cockpit/">contributors</ulink>.</para>
  </refsect1>

  <refsect1 id="remotectl-see-also">
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>cockpit-ws</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
</refentry>
