Linux serverlinux web serverNETWORK ADMINISTRATIONS

"Shell In A Box" | shellinabox | A Web-Based SSH Terminal Remote Linux Ubuntu By Amit Pandey

Shell In A Box – A Web-Based SSH Terminal to Access Remote Linux Servers emulator created by Markus Gutschke. It has built-in web server that runs as a web-based SSH client on a specified port and prompt you a web terminal emulator to access and control your Linux Server SSH Shell remotely using any AJAX/JavaScript and CSS enabled browsers without the need of any additional browser plugins such as FireSSH.
In this tutorial, I describe how to install Shellinabox and access remote SSH terminal using a modern web browser on any machine. Web-based SSH is very useful when you are protected with firewall and only HTTP(s) traffic can get through.
Installing Shellinabox on Linux
apt-cache search shellinabox
apt-get install -f openssl shellinabox
vim /etc/default/shellinabox
systemctl enable shellinaboxd.service
systemctl enable shellinabox
systemctl enable shellinabox
systemctl restart shellinabox
this is configration file open you can change port no and specify ip for login on that machin
vim /etc/default/shellinabox
===========================================
SHELLINABOX_DAEMON_START=1
SHELLINABOX_PORT=4200 Seting for Ubuntu
SHELLINABOX_ARGS=”–no-beep”
# sudo netstat -nap | grep shellinabo
# netstat -nap | grep shellinabox
Install dependencies
apt-get install git libssl-dev libpam0g-dev zlib1g-dev dh-autoreconf
yum install git openssl-devel pam-devel zlib-devel autoconf automake libtool
Clone source files and move to project directory
git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox
Run autotools in project directory
autoreconf -i
Run configure and make in project directory
./configure && make
Installing Shellinabox on Linux `
On Debian, Ubuntu and Linux Mint
$ sudo apt-cache search shellinabox
$ sudo apt-get install openssl shellinabox
On RHEL, CentOS and Fedora
# yum install openssl shellinabox
Configuring Shellinabox
On Debian, Ubuntu and Linux Mint
$ sudo vi /etc/default/shellinabox
# TCP port that shellinboxd’s webserver listens on
SHELLINABOX_PORT=6175
# specify the IP address of a destination SSH server
SHELLINABOX_ARGS=”–o-beep -s /:SSH:172.16.25.125″
# if you want to restrict access to shellinaboxd from localhost only
SHELLINABOX_ARGS=”–o-beep -s /:SSH:172.16.25.125 –localhost-only”
On RHEL, CentOS and Fedora
# vi /etc/sysconfig/shellinaboxd
# TCP port that shellinboxd’s webserver listens on
PORT=6175
# specify the IP address of a destination SSH server
OPTS=”-s /:SSH:172.16.25.125″
# if you want to restrict access to shellinaboxd from localhost only
OPTS=”-s /:SSH:172.16.25.125 –localhost-only”
Starting Shellinabox
Once you’ve done with the configuration, you can start the service by issuing following command.
On Debian, Ubuntu and Linux Mint
$ sudo service shellinaboxd start
On RHEL and CentOS
# service shellinaboxd start
On Fedora
# systemctl enable shellinaboxd.service
# systemctl start shellinaboxd.service
Verify Shellinabox
Now let’s verify whether Shellinabox is running on port 6175 using “netstat” command.
$ sudo netstat -nap | grep shellinabox
or
# netstat -nap | grep shellinabox
~# apt-get update
~# apt-get install shellinabox
SHELLINABOX_ARGS=”-s/:LOGIN -t –no-beep”
~# /etc/init.d/shellinabox restart
Install shellinabox
$ sudo apt-get install shellinabox
In RHEL/CentOS systems:
First, install EPEL repository using command:
# yum install epel-release
Then, install shellinabox using command:
# yum install shellinabox
Done!
Configure shellinabox
shellinabox listens on port 4200 by default
If you want to change the default port,
In Debian/Ubuntu:
$ sudo vi /etc/default/shellinabox
In RHEL/CentOS/Fedora:
# vi /etc/sysconfig/shellinaboxd
Change your port to any random number. Since I am testing it on my local network, I use the default values.
# Shell in a box daemon configuration
# For details see shellinaboxd man page
# Basic options
USER=shellinabox
GROUP=shellinabox
CERTDIR=/var/lib/shellinabox
PORT=4200
OPTS=”–disable-ssl-menu -s /:LOGIN”
# Additional examples with custom options:
# Fancy configuration with right-click menu choice for black-on-white:
# OPTS=”–user-css Normal:+black-on-white.css,Reverse:-white-on-black.css –disable-ssl-menu -s /:LOGIN”
# Simple configuration for running it as an SSH console with SSL disabled:
# OPTS=”-t -s /:SSH:host.example.com”
Restart shelinabox service.
In Debian/Ubuntu:
$ sudo systemctl restart shellinabox
$ sudo service shellinabox restart
# systemctl enable shellinaboxd
# chkconfig shellinaboxd on
Remember to open up port 4200 or any port that you assign if you are running a firewall.
For example, in RHEL/CentOS systems, you can allow the port as shown below.
# firewall-cmd –permanent –add-port=4200/tcp
# firewall-cmd –reload
Amitechnology

http://ami9.com
https://www.instagram.com/amit9echnology
http://facebook.com/ami9com
https://plus.google.com/+AmiTechnologyami9

source

by Vacnic IT Solution

linux web server

Leave a Reply

Your email address will not be published. Required fields are marked *