Appearance
fob CLI reference
Every fob command, option and environment variable. To install fob and get started, see Connect to servers.
Commands
| Command | What it does |
|---|---|
fob login [org] | Signs in through the browser and gets a certificate. Your first organization becomes the default. With no name, signs in to the default again. --no-browser prints the sign-in link instead of opening it. |
fob ls | Lists the servers you can reach, whether each is through Fob or direct, and your logins on each. |
fob connect <[login@]server> [ssh args] | Connects with SSH, through Fob when the server runs fob-agent and directly otherwise. Everything after the server goes to ssh. fob ssh is the same command. |
fob cert | Gets a new certificate, for connecting with plain ssh. |
fob request [name] --hours N --reason "..." | Asks for access to a server group or server. With no name, lists what you can ask for. --hours defaults to 1. |
fob requests | Lists your access requests and where they stand. |
fob status | Lists the organizations you're signed in to, marks the default, and shows whether each sign-in is still valid and when each certificate expires. |
fob logout | Signs out of the organization and deletes its certificate. --all signs out of every organization. |
fob config | Shows which organization, console and folder fob uses, and where each setting comes from. |
fob config set org <org> | Makes an organization the default. |
fob config unset org | Clears the default. |
Options
These work with every command. Put them before the server in fob connect, since everything after the server goes to ssh.
| Option | Environment variable | What it does |
|---|---|---|
--org, -o | FOB_ORG | The organization to use, by its name in its URL, such as acme. |
--console | FOB_CONSOLE | The Fob console your organization is on, if it isn't https://app.fob.so. |
--home | FOB_HOME | Where fob keeps its sign-ins, keys and settings, instead of ~/.fob. |
How fob picks an organization
fob uses the first of these that's set:
--orgon the command.- The
FOB_ORGenvironment variable. - Your default, set by your first
fob loginor byfob config set org. - The organization you're signed in to, if there's only one.
If none is set, fob lists the organizations you're signed in to and stops. Signing out keeps your default.
Files
fob keeps everything in ~/.fob, or in FOB_HOME if you set it.
| File | What it is |
|---|---|
<org>_ed25519 and <org>_ed25519-cert.pub | Your key and current certificate, for plain ssh |
<org>_known_hosts | Your organization's host CA, so ssh can check servers |
config.json | Your default organization and its console |