FONEHOME(1)

πŸ“¦ version 1.2.2, in opensuse-leap 16.0

πŸ’– FONEHOME(1) β€” like, the manual page, bestie πŸ’–

okay so picture this: it's General Commands Manual o'clock and you're about to meet fonehome, the icon herself. she's got a whole NAME section energy and honestly? she ate.


✨ NAME ✨

fonehome β€” establish connection to fonehome server 🫢


🌸 SYNOPSIS 🌸

fonehome [-f config-file]
fonehome -I

that's it. two moods. two vibes. pick one. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so fonehome is, like, a wrapper for the ssh(1) program β€” she's not trying to be ssh, she's ssh's hype woman. what she does is create a persistent no-pty ssh(1) connection to one or more fonehome servers, and she sets up normal and reverse port forwarding according to whatever's in the config over at /etc/fonehome/fonehome.conf. and like… what does that get you? private, bi-directional connections between the fonehome client and server, fully secured, and you never have to touch a firewall setup. not once. not ever. πŸ”₯

she's genuinely that girl when you've got a bunch of machines deployed in the field and you want to keep secure access to them from a central operations server β€” no firewall hassles, no drama, no cap.

normally fonehome runs as a systemd(1) service, living her best low-key life. but β€” and this is the important part, listen up β€” upon first installation (or whenever a server's host key changes), there's a manual initialization step you must do: run fonehome yourself, by hand, with the -I flag. that's how the administrator gets to confirm and accept the server host key(s). it's giving ✨responsible adult supervision✨ and you can't skip it.


πŸŽ€ OPTIONS πŸŽ€

  • -f config-file β€” use an alternate configuration file instead of the default /etc/fonehome/fonehome.conf. very "i have a different file and i'm not sorry" of you.
  • -I β€” perform first-time initialization when connecting to a new server. this is the one where you, a human, confirm the host key. iconic, necessary, do it. πŸ™ˆ

πŸ’œ CONFIGURATION πŸ’œ

the config file is a bash(1) source file β€” yes, it's literally bash, she speaks shell natively β€” and it defines the following shell variables:

  • SERVER β€” defines the host to connect to. this is the only variable that is strictly required. everything else has a default, she's very self-sufficient. πŸ‘‘
  • SSH_FLAGS β€” ssh(1) command line flags to use with the connection. typically this will contain reverse-forwarded ports so connections can come back from the server to the client. it's giving main character energy for your port forwards.
  • USERNAME β€” SSH username. default is fonehome.
  • KEY_FILE β€” file containing the SSH private key. this file must be unencrypted to allow for unattended operation; however, it should be readable only by root. both of those things, at the same time, no exceptions. default is /etc/fonehome/fonehome.key.
  • RETRY_DELAY β€” how long (in seconds) to pause between connection attempts. default is 30 seconds.
  • SYSLOG_TAG β€” identifier to use when logging to syslog(3). default is fonehome.
  • SYSLOG_FACILITY β€” facility to use when logging to syslog(3). default is daemon.
  • KNOWN_HOSTS_FILE β€” SSH known hosts file used to store recognized server public keys. default is /etc/fonehome/fonehome.hosts.
lowkey memorise those defaults, they come up in conversation. πŸ“

🌈 MULTIPLE SERVERS 🌈

bestie. she supports connecting to multiple servers. yes, plural. multiple. πŸŽ€

to enable multi-server support, simply declare SERVER as a bash(1) array variable. then a separate connection will be maintained to each server in the array. one for you, one for you, one for you…

when multiple servers are configured, the USERNAME, SSH_FLAGS, KEY_FILE, and RETRY_DELAY variables may also be declared as arrays β€” in which case the corresponding array elements will be used for each server. very "matching outfits for each server" of them.

and if these variables are not arrays, or are shorter than the SERVER array, then the last value will be used repeatedly (iykyk β€” bash array indexing, she recycles, it's sustainable πŸ’…). therefore, setting a simple (non-array) value results in that value being used for all servers. easy. done. periodt.


🧚 FILES 🧚

  • /etc/fonehome/fonehome.conf β€” default configuration file.
  • /etc/fonehome/fonehome.key β€” default private SSH key file used to authenticate to the server.
  • /etc/fonehome/fonehome.hosts β€” default SSH known hosts file used to store and verify the server's public key.

⭐ SEE ALSO ⭐


okay that's the whole page, you're officially educated. this was Debian, dated January 2, 2013 β€” shoutout to the OG release, she's been slaying since day one πŸ’–βœ¨πŸŽ€ go forth and forward some ports, bestie. πŸ¦‹

πŸ“¦ where this page comes from