How to ssh to a server via web browser to run a command?


Joined
Oct 20, 2022
Messages
1
Reaction score
0
Hi guys, I am designing a web page to allow me to perform some commands on my server running Ubuntu 18.04. Supposing the server's IP does not change, and the IP from which I am running the commands are allowed in, how do I go abouts coding this? I was considering the use of the ssh2 library, but not exactly sure how to start? Thanks a mil
 
Ad

Advertisements

Ad

Advertisements

Joined
Mar 11, 2022
Messages
167
Reaction score
22
I would highly reccomend to not do that at all. This is a security risk at it's best.
There is a lot of great NODE librarys out there to almost manage a server by js only. DON'T DO IT. I am even concerned about REACT.

NODE indeed is able to get to your system core. BAD THING.

Figure out for what you need SSH and what should be editable. If it's not core related, use PHP exec and or shellexec or system to to shell coding.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top