Terminals. Text messaging. The need for instant SSH terminal access with good security and little setup.

What it does

SSH 4 SMS gives you full terminal access to your server via your favorite text messaging app, a temporary phone number, and an optional (but highly recommended) custom iOS terminal keyboard.

Accomplished goals

  1. Ability to create temporary, self-destructing, secure SMS terminal sessions
  2. Stateful sessions (remember working directory, environment variables, etc. throughout the shell session)
  3. Invite other phone numbers to collaborate in existing sessions
  4. Resolve iOS autofill and autocomplete issues by creating a terminal-specific system keyboard

How we built it

Our server app was written in Node.js with Twilio for SMS message handling, and our iOS keyboard is written in Swift.

Challenges we ran into

The Node.js native command library is not stateful, so important commands like cd directory and export ENV_VAR="value" have no effect post-execution. We resolved this by using a stateful command processing library intended for Windows Powershell, which we've optimized for bash and sh on Linux and OS X servers.

Security was also a major concern, because we needed to ensure both the user's shell sessions and command histories are safe and secure. Only a user's primary phone number may create, destroy, or edit shell sessions, but the user has the ability to invite other phone numbers to individual sessions for project collaboration and tech support. All sessions exist through temporary, randomly generated phone numbers, and all sessions self-destruct on a timer.

Lastly, we discovered that mobile keyboards are not optimized for terminal syntax. Both Android and iOS keyboards have autocorrect and autofill features that conflict with typing commands, so we found it easier to write a special iOS keyboard.

What we learned

Security is high priority and easy to ignore. Mobile autocorrect is frustrating. Randomly generating temporary phone numbers is expensive. Late night cookies are great.

What's next for SSH 4 SMS

Currently, SSH 4 SMS users must install a Node.js server with ngrok and relevant API credentials, but this process could be greatly streamlined by creating a central server that handles all API and database work. The keyboard portion of the project also has potential outside of SSH 4 SMS, as it works great with other command-processing apps as well.

+ 2 more
Share this project: