CLI Setup
Before you can use the CLI, you need to configure it with your GPCORE credentials. The setup process runs automatically the first time you execute any gpcore command. It will prompt you for your OAuth client ID and secret (created in user settings under OAuth Clients), as well as your username and password. Non-sensitive configuration is stored in ~/.config/gportal/config.json, while secrets are kept in the system keyring where supported.
On first run, it asks for credentials (client-id, client-secret, username and
password). Non-critical information will be stored in a config file
(~/.config/gportal/config.json). Sensitive information will be stored in the
keyring (if supported by the OS). The keyring is encrypted with the user's
password. To secure the connection between client and server, a SSH public/private
key pair will be generated and secured with a passphrase. The passphrase is
the same as the password for the GPCORE account. This way, the connection
between client and server is secured and no other ssh client can connect to it.
If you messed up your config, the sensitive data in the keyring or the public/private
key, you can reset everything with the gpcore agent setup command. Use the
--admin flag to setup the admin credentials as well.
The agent (SSH server) will start automatically and place itself in the background
until the user actively stops it with gpcore agent stop. So the first command will
take a little longer (because the agent has to start), but all following commands
will be executed immediately.
The client itself is a simple SSH client. It connects to the agent and sends commands to it. The result is printed to stdout. You can use the standard SSH command (ssh) to connect through it, but it is not that convenient.