/ iox

How Do I Login to an IOx Container Quickly?

IOx applications are deployed via Fog Director, Local Manager web interfaces or the ioxclient command line program. The web pages are easy to use, but it's hard to get the .pem file required to login to the container (for debugging) because you need to copy and paste the .pem file from the browser to a file then use ssh -i App.pem appconsole@ip

Using ioxclient 1.1, ioxclient can actually download the .pem file, so it's possible to login with a single command:

$((ioxclient app con App;chmod 600 App.pem)|grep ssh)

Normally you'd do this in two steps:

C:\> ioxclient app con App
$ chmod 600 App.pem
$ ssh -p 2222 -i App.pem appconsole@ip

Using one command is much easier.

Using ioxclient 1.2, the ssh command is run automatically and actually included in the Windows binary itself. However, ioxclient exits when entering ^C, which can be a problem on IOx. For instance, a normal thing to do on IOx while developing code is to login to the container and watch a log file:

C:\> ioxclient app con App
$ tail -f /var/log/some.log

The IOx App Console isn't SSH, it's an SSH tunnel over a serial connection. Therefore, the ioxclient exits but the SSH tunnel remains active. You'll notice how different this is when using SSH into the same app console twice. Both connections are active at the same time. Which is confusing, but expected based on how it actually works. The side-effect of this is the fact that SCP and other SSH things don't actually work, so getting files into a running container is hard to do, but that's another story.

So, when I connect a 2nd time, I'm faced with a dilemma. How do I send ^C to the program to make it stop? Basically, you can't. You can send ^, which will force it to stop (i.e. core dump).

A better way is to use the .pem file with a real ssh client, thusly:

C:\> ioxclient app con App
^C
$ chmod 600 App.pem
$ ssh -p 2222 -i App.pem appconsole@ip
$ tail -f /var/log/some.log
How Do I Login to an IOx Container Quickly?
Share this