Eric's picture

I'm installing TK PostgreSQL v. 18.0.  I have a set of instructions that I've used to install earlier versions with no issues.  There is a point at which I run "ssh_keygen -t rsa" to generate files "id_rsa" and id_rsa.pub".  I usually run the command from Web Shell but since that's no longer available I ran the command from Webmin command shell.  It starts to run and stops at "Enter file in which to save the key (/root.ssh/id_rsa):". Then it returns to the command prompt without continuing or generating the keys.

Is Webmin command shell incapable of performing the same as Web Shell?

Additionally, I used PuTTy to ssh into the server and run the command to generate the keys after which Webmin command shell now responds to the ssh-keygen command. With:

root@postgresql ~]# ssh-keygen -f rsa
Enter passphrase (empty for no passphrase): Enter same passphrase again: Generating public/private rsa key pair.
Your identification has been saved in rsa
Your public key has been saved in rsa.pub
The key fingerprint is:
SHA256:3zz7KF5Cw4b7I78wK0d4/Cw0KiqJt8wyBL40 root@postgresql
The key's randomart image is:
+---[RSA 3072]----+
|       .         |
|      . .        |
|       + .       |
| .  . . Bo       |
|.... . +SB=      |
|o+..  o *=++     |
|E.+              |
|..+o  . o=+o +   |
| . oo  o.+=+o..  |
+----[SHA256]-----+

What's going on here?

Forum: 
Jeremy Davis's picture

Hi Eric, thanks for reporting.

I'm pretty under the pump at the moment, but I have opened a new issue on our tracker to ensure that this is not forgotten and I will circle back ASAP.

Judging from your report, it appears that the Webmin shell is not acting like a "proper" interactive shell!? I could have sworn that I tested it, in the lead up to removing Webshell in v18.0 but my (manual) testing may well have been inadequate? Either way, I should probably consult my notes to be sure.

I was under the impression that Webmin DID now provide a "proper" interactive shell - as of a number of releases ago. I actually raised the issue with them (re the non-interactive shell) some time ago and my Webmin bug report/feature request has since been closed with a note that an interactive shell has been implemented. That is indeed why Webshell was removed - as I thought that Webmin now provided the same functionality that Webshell did.

FWIW whilst Webshell was/is still working, it is quite old and is essentially "abandonware". At some point it is inevitable that it will stop working (unless someone takes over maintenance of it). Last I checked, it doesn't support modern SSL encryption (and requires/relies on old broken ciphers) - hence why we had it behind stunnel.

Regardless, your report suggests that either I've misunderstood something, or perhaps there is a dependency/configuration issue with our implementation?

I will need to investigate further and see if it's just a config/dependency issue on our end, or if indeed we've jumped the gun and removed Webshell before the functionality is included in Webmin.

I guess it is at least some consolation that SSH works as expected. Although I understand that that isn't quite as convenient and "turnkey" as being able to do it in your browser.

As something of an aside, I'm not sure what OS you are using, but Linux and Mac should come with the OpenSSL package installed (i.e. includes the commands you used on your TurnKey server). And on Windows it can be easily installed. I would expect that to give a better user experience than PuTTY (although obviously PuTTY should work too).

In the meantime, IIRC there has been a more recent release of Webmin (that I packaged). I can't confirm that that would work as intended, but may be worth a try? Having said that I don't recall the release timeline and PostgreSQL may well already include the newer Webmin!? Either way, if you do do that, it'd be great if you report back.

Probably the easiest way to update the (or at least check for) updated Webmin packages, is via apt. I.e.:

apt update
apt install webmin

If it says that webmin is already at the latest version, then that's a dead end.

If I can confirm that Webmin doesn't and can't yet provide the same functionality that Webshell did, I will look to re-implement Webshell into TurnKey and for existing appliances, at least document how to reinstall it.

Alternatively, if I discover that its a fault with our config/implementation I will document it initially (if it's easy enough to fix/workaround), with an aim to release updated (and fixed) Webmin packages.

Thanks again for the report and apologies on the inconvenience.

Jeremy Davis's picture

Update: I have uploaded the package to our apt repo now, so you should be able to install with:

apt update
apt install webmin-xterm

It appears that somewhere between may initial testing and uploading packages, the webmin-xterm didn't make it to the apt repo... Opps!

I'll need to circle back and upload it to our repos sometime soon, but in the meantime I've just uploaded it to the new GitHub issues that I've created. To save you having to click through, I'll repost the instructions.


Important note! Whilst the file has a .gz file extension, that has just been added to work about GitHub's file type limitations (i.e. .deb files aren't supported/allowed). Please follow the instructions below to install it (requires root, so if not running as root user, prefix with sudo).

To install, first download the file (from your TKL server):

wget https://github.com/turnkeylinux/tracker/files/14338617/webmin-xterm_2.105-turnkey%2B0_all.deb.gz

Then either, rename it and install via apt (preferred):

mv webmin-xterm_2.105-turnkey+0_all.deb.gz webmin-xterm_2.105-turnkey+0_all.deb
apt install -y ./webmin-xterm_2.105-turnkey+0_all.deb

Or install with dpkg (doesn't require file rename, but will fail if you don't have Webmin v2.105 already installed):

dpkg -i webmin-xterm_2.105-turnkey+0_all.deb.gz

Once it's installed, restart the Webmin server (may not be required - but just on the safe side):

systemctl restart webmin

And open Webmin in your browser (if you already had it open, just refresh the window/tab). Then in the left hand menu, browse to Tools >> Terminal.Here's a screenshot (click to open a larger version in a new window/tab):

Eric's picture

Hey Jeremy

apt update, apt install webmin-xterm solved the issue replacing Webmin command shell with Webmin Terminal.

After a fresh install and setup (set IP address, region and time zone, run security updates), I ran apt update, apt install webmin-xterm from command line. Then I finished my setup from Webmin Terminal and all is well.

Prior to my initial post, I did run across the following and was going to ask about Webmin Terminal next.

In the link, the last paragraph addresses the non-interactive limits of Webmin command shell. The last line in the article has a link about Webmin Terminal as the solution.
https://webmin.com/docs/modules/command-shell/

https://webmin.com/docs/modules/terminal/

Thanks for the quick solve.

Jeremy Davis's picture

Great news Eric. Glad that that worked for you and resolved the issue.

As I said it was a gross oversight on my behalf. I built and tested the webmin-xterm package, but neglected to upload it to our apt repo so none of the appliances included it! Doh!

Thinking about this some more, it does make me wonder if it might be best to not include the "Command Shell" module by default - just the "Terminal" one? Do you have any thoughts there?

Eric's picture

If "Terminal", being the actual interactive shell that replaces "Web Shell", does everything "Command Shell" does and more, I would see no reason to include "Command Shell".

Whatever you decide, you might want to specify that "Terminal" is replacing "Web Shell as the interactive shell in the Change Log.
 

  • Web shell (shellinabox):
    • Completely removed in v18.0 (Webmin now has a proper interactive shell).
Jeremy Davis's picture

Thanks for sharing your thoughts Eric. I agree on both counts.

For all appliances that we are working on- i.e. yet to be released as v18.0 - I will remove "Command Shell" and include "Terminal". Once we have completed the rest of the v18.0 updates (perhaps sooner) I will look to rebuild the existing v18.0 appliances to also match that.

Add new comment