Have FTP but no ssh? Web Shell to the rescue!

There are many times a web shell can come in handy, such as  running a non-shell OS or if you have FTP but non SSH.  Web shell to the rescue!  The top three I could find are b374k-shell, ajaxshell, and shellinabox.  b374k-shell is my favorite, because it is all-around better than ajaxshell, and it doesn’t require compilation like shellinabox.  So enter b374k-shell a php web app that emulates some core capabilities of a shell.  Here is my review.

Features:

  1. A web-app that is a self-contained php file
  2. Password protected – stores a hash of your password within the php file
  3. Secure if you have https configured
  4. basic shell
  5. file browser, with options to
    • upload
    • edit
    • download
    • create
    • delete
    • rename
    • hex view
    • compress
    • decompress
    • copy
    • paste
    • chmod
    • limited bulk operations
  6. process manager
  7. system info browser
  8. php/python/ruby/perl/gcc evaluator
  9. db shells

 

Limitations:

  1. Can’t sshfs
  2. Bulk upload/download
  3. Basic editor with no syntax highlighting
  4. Works on mobile, but isn’t optimized for mobile

 

Conclusion:  It isn’t as good as ssh, but it’s super cool and can do everything you need it to for web development.

Best options for SSHFS on Mac OSX

Thank heavens for SSHFS! SSHFS allows me to locally mount remote linux/unix filesystems. This allows me to create and edit remote files using all of my native software! Sadly, the documentation for SSHFS options are weak, and the default options never work well for me. I’ve used SSHFS nearly every day for the past 3 months, and here is my recommendation for options for OSX:

  • nohup – makes the connection more reliable
  • follow_symlinks – optional, but is necessary if you want symlink folders to work
  • allow_other – let’s you assume file priviledges of the remote user
  • no_readahead, noappledouble, nolocalcaches – reduces overhead and makes Finder work MUCH faster

BONUS Want to make SSHFS work beautifully with SSHFS?  Check out this teaser:

If you want this, follow these instructions:

  1. Create a mount folder
  2. In the folder, create a script with the extension “.command”
  3. Add this to the script:

  1. Allow the script to be executable.  I usually do this from the terminal by typing:

  1. Now when you double click the script, the folder will turn into your remote folder.  To go back, simple click the eject icon next to the folder.
  2. Profit.