Search code examples
phpwindowslinuxsshnatty

SSH package for PHP?


Ok this may seem like a very, very awkward question but here's my problem:

I need to be able to SSH to my site while at the library at my school but the only thing is that it NEVER works if I try to FileZilla it or puTTy it. I am not even using port 22 rather a separate port. Still it seams as if it is blocked.

I was wondering if I could use some package that I can add to my admin section on my site so I can ssh to my site directly from the browser (Also my school uses windows so doing ctrl+x in nano doesn't work.

I would preferably use PHP, as I can not use any other Server Side language (technical reasons) and I am pretty noob to websites and stuff, this is my first project as such.


Solution

  • PHP has an excellent built-in SSH package (via pecl): https://www.php.net/manual/en/book.ssh2.php

    If you don't already have it, here are installation instructions: https://www.php.net/manual/en/install.pecl.intro.php