SSH Into our App
To do this, we will login with SSH to our application VM. There is a one-time setup task for using SSH. Follow the instructions.Tip: One of several ways to exit the IEx shell is to hit
Ctrl+C, Ctrl+C; to log out of the VM console, use Ctrl+D or exit.The
--pty flag tells the SSH server to run the command in a pseudo-terminal. You will generally need this only when running interactive commands, like IEx.Creating a Shell Script for Convenience
In UNIX-based operating system like Linux and Mac OS, we can create a shell script to make connecting to the server with an IEx terminal easy. The same can be done with a Windows PowerShell script or batch file. However we name the file will be our “command” for opening the IEx shell into the server. Here we’ll usefiex, short for “Fly IEx”.
--pty flag supports our interactive terminal and is needed to support the --remsh option used when we call remote.
The --select flag will prompt for which instance to connect to. This is handy when deployed to multiple regions and we want to be explicit about where we connect.
Remember to make the script executable: chmod +x fiex.
Using a terminal from the app directory, type ./fiex to quickly jump into an IEx shell on the server.