Does anyone (cough @meredydd / @daviesian / @shaun cough ) have an idea on how to embed an SSH client within an Anvil app? I’m thinking https://mobaxterm.mobatek.net/ without all the frilly bits (just a centralised browser based way to access my servers.
You can embed anything within an Anvil app using an <iframe>, and we recently created a script to make the <iframe> automatically stretch to fit the contents of the app:
But you can also create an SSH client yourself in Anvil by using subprocess.check_output in a Server Module (OpenSSH is installed in the Anvil server runtime). Or of course you could do a similar thing with an Uplink script.
Now this is very interesting … kind of annoyed I didn’t think of it myself. I do keep forgetting you can just send an ssh command without opening an interactive tty session.
I’m assuming you have to use a key rather than a password - how do you store it? In that variable?
But, it doesn’t half look risky. Thinking about it, they could be logging everything I type, so even if I use a minimal user/pass as entry point and su to root once in (so root details are not stored on the site) they could still see everything I;m doing.
Yeah, looks good, but it suffers from the same trust issues at the one I posted above, in that I have no idea what they are logging.
The shellngn one does at least allow you to install it locally, but again without a full audit of the code they could (intentionally or otherwise) have access to critical data in transit.
I guess any ssh management program suffers from that issue, even ones you install. I guess it’s just what one is comfortable with.