|
| 1 | +# macchina.io REMOTE Login (remote-login) |
| 2 | + |
| 3 | +`remote-login` is a command-line program that obtains an OAuth 2.0 token (JWT) from |
| 4 | +the macchina.io REMOTE server. The program will ask the user for their |
| 5 | +username and password (unless these are provided via command-line parameters). |
| 6 | + |
| 7 | +The program then uses the macchina.io REMOTE server API to request a token, |
| 8 | +using the given credentials. If the user has two-factor authentication enabled |
| 9 | +on the server, the program will also ask for a time-based one-time password (TOTP), |
| 10 | +typically provided by an authenticator app like Authy or Google Authenticator. |
| 11 | + |
| 12 | +The received token will then be stored in the file `.remote-credentials.properties` |
| 13 | +in the user's home directory. If present, this file will be read by all macchina.io REMOTE |
| 14 | +client programs (`remote-client`, `remote-ssh`, etc.) on startup, and the stored |
| 15 | +token will be used for authentication against the macchina.io REMOTE server. |
| 16 | + |
| 17 | +The main advantage of `remote-login` over using environment variables or |
| 18 | +configuration files to store the credentials is that only the token is |
| 19 | +stored on the local machine. The token has a limited validity, typically |
| 20 | +24 hours, but depending on the macchina.io REMOTE server configuration. |
| 21 | + |
| 22 | +## Running remote-login |
| 23 | + |
| 24 | +`remote-login` usually does not need a configuration file, any parameters can be passed |
| 25 | +via command-line arguments. Some settings can be set using a configuration file |
| 26 | +(see the `remote-client` [documentation](../WebTunnelClient/README.md) for more |
| 27 | +information on configuration files). |
| 28 | + |
| 29 | +At startup, `remote-login` will look for a configuration file named |
| 30 | +`.remote-login.properties` in the current user's home directory, and read it if it's present. |
| 31 | + |
| 32 | +To request a token, run `remote-login` without parameters. The program will ask |
| 33 | +for a username and password, and, if two-factor authentication has been enabled for |
| 34 | +the user, will also ask for a time-based one-time password. |
| 35 | + |
| 36 | +If no further command-line parameters or configuration files are given, `remote-login` |
| 37 | +will use https://remote.macchina.io to obtain the token. To use a different server, |
| 38 | +specify the `--reflector-uri` command-line parameter, e.g.: |
| 39 | + |
| 40 | +``` |
| 41 | +remote-login --reflector-uri=https://remote.company.com |
| 42 | +``` |
| 43 | + |
| 44 | +Alternatively, you can create a configuration file |
| 45 | +(`.remote-login.properties` in the home directory) containing: |
| 46 | + |
| 47 | +``` |
| 48 | +remote.reflectorURI = https://remote.company.com |
| 49 | +``` |
| 50 | + |
| 51 | +To check the validity of an existing token, run: |
| 52 | + |
| 53 | +``` |
| 54 | +remote-login --status |
| 55 | +``` |
| 56 | + |
| 57 | +To clear the token (and delete the `.remote-credentials.properties` file), run: |
| 58 | + |
| 59 | +``` |
| 60 | +remote-login --clear |
| 61 | +`` |
| 62 | +
|
| 63 | +## Configuration |
| 64 | +
|
| 65 | +### Command-Line Arguments Help |
| 66 | +
|
| 67 | +You can run `remote-ssh` without command-line options (or with `--help` |
| 68 | +or `/help` on Windows) to see a help screen with available command-line options. |
| 69 | +
|
| 70 | +### SSL/TLS Configuration |
| 71 | +
|
| 72 | +Please refer to the [`WebTunnelAgent`](../WebTunnelAgent/README.md#ssltls-configuration) |
| 73 | +documentation for SSL/TLS configuration settings. |
| 74 | +
|
| 75 | +### HTTP Proxy Configuration |
| 76 | +
|
| 77 | +Please refer to the [`WebTunnelAgent`](../WebTunnelAgent/README.md#http-configuration) |
| 78 | +documentation for configuring a HTTP proxy, including proxy credentials. |
0 commit comments