Skip to content

fob CLI reference ​

Every fob command, option and environment variable. To install fob and get started, see Connect to servers.

Commands ​

CommandWhat 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 lsLists 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 certGets 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 requestsLists your access requests and where they stand.
fob statusLists 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 logoutSigns out of the organization and deletes its certificate. --all signs out of every organization.
fob configShows 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 orgClears the default.

Options ​

These work with every command. Put them before the server in fob connect, since everything after the server goes to ssh.

OptionEnvironment variableWhat it does
--org, -oFOB_ORGThe organization to use, by its name in its URL, such as acme.
--consoleFOB_CONSOLEThe Fob console your organization is on, if it isn't https://app.fob.so.
--homeFOB_HOMEWhere 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:

  1. --org on the command.
  2. The FOB_ORG environment variable.
  3. Your default, set by your first fob login or by fob config set org.
  4. 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.

FileWhat it is
<org>_ed25519 and <org>_ed25519-cert.pubYour key and current certificate, for plain ssh
<org>_known_hostsYour organization's host CA, so ssh can check servers
config.jsonYour default organization and its console