As a qualified operation and maintenance shovel feces officer, will either windows server or a Linux server or switch equipment, and other one-stop shop to manage, monitor and audit user behavior in real-time, effectively avoid deleting foot library events! The operation of non-standard behavior say no! Build an effective management operation and maintenance platform in a limited budget or no budget situation is painful for each operation and maintenance employees!
If the company does not have enough budget to buy commercial bastion machine, or even no budget, then webterminal will be your best choice. Webterminal aims to provide a complete set of machine operation and maintenance fort audit functions for small and medium enterprises. Currently webterminal support ssh, sftp, rdp, telnet, vnc protocol devices that support web version and call the client used a remote administration tool (xshell, securecrt, mstsc) call! Currently webterminal is fully comparable business experience bastion machine! Whether you use a Mac, windows or Linux, you can easily connect to the specified server!
Since webterminal based languages (c, python, go, etc.) development, build and install configuration on Linux environment is more complex, the chance of error is relatively large, deployment success rate is relatively low, the authors provide pre-compiled docker mirror to exempt installation pain! We suggest that you deploy this system in the form of a docker. . .
The following example to centos 7 installation and configuration:
System Version
# CAT / etc / RedHat-Release
CentOS Linux Release 7.5.1804 (Core)
System IP: 192.168.56.103
system environment: on Oracle VM VirtualBox platform to build virtual machines
1, the installation docker-ce
https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/
# cd /etc/yum.repos.d/
# wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
# vim docker-ce.repo #这一步会提示一共有24处修改的,大家需要注意
:%s@https://download.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce/@
然后保存
# yum repolist
# yum install -y docker-ce
Set Ali cloud docker accelerator here: self-free application https://cr.console.aliyun.com/cn-hangzhou/mirrors
mirrored configuration accelerator
You can use accelerator /etc/docker/daemon.json by modifying the daemon configuration file
# mkdir -p /etc/docker
# vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://f2bv707v.mirror.aliyuncs.com"]
}
# systemctl daemon-reload
# systemctl restart docker
# systemctl enable docker
# docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:21:07 2019
OS/Arch: linux/amd64
2, the installation program
https://github.com/jimmy201602/webterminal project address
Foreign users pull the project (docker pull webterminal / webterminal)
Chinese users pull the project, Ali cloud mirroring time depending on the network environment, please be patient, image size is about 2G
# docker pull registry.cn-hangzhou.aliyuncs.com/webterminal/webterminal
启动运行项目
# docker run -itd -p 80:80 -p 2100:2100 registry.cn-hangzhou.aliyuncs.com/webterminal/webterminal
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ebae23bd87c7 registry.cn-hangzhou.aliyuncs.com/webterminal/webterminal "/docker-entrypoint.…" 5 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:2100->2100/tcp cranky_bhaskara
Access Project
http: // webterminal_server_ip
Project default account
username: admin
project default password
password: password 23456!
3, configuration items
Using the default account password
will prompt us Setup Assistant, click Download, download
After the download is successful, click install, installed in accordance with the default way to enter
the default installation path
C: \ Program Files (x86) \ webterminal helper
In fact webterminal is to connect to the server via ssh, so we need to give increased server credentials
正确的填写可以连接主机的账户和密码
添加成功
凭证添加好后,在添加服务器
选择相对应的凭证、IP地址一栏一定要正确填写需要连接服务器的IP
添加成功
新增服务器组
这个服务器组的增加,是为了便于账号和服务器挂钩的
把相对应的服务器添加在同一个组
同一个服务器可以在不同的服务器组中
然后新增用户
正确设置用户的信息
添加成功
最后,通过权限列表,把用户和服务器关联起来
先选择用户
可以通过每个权限前面的√来选择
记得选择服务器组
注销admin
使用新创建的用户登录
登录
点击服务器-->连接
在页面右边,就会连接上测试的服务器
查看日志信息
Kill按钮,就是可以把一个正在远程的用户给踢掉
点击重播按钮,可以查视频监控
点击播放按钮、即可观看
点击命令按钮
可以查看输入的命令
点击文件管理按钮、可以在服务器和本机,直接拉取文件
文件上传中
上传成功
查看使用webterminal连接服务器时,服务器的登录用户情况
# w
17:47:17 up 38 min, 2 users, load average: 0.25, 0.24, 0.42
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.56.1 17:11 5.00s 0.11s 0.02s w
root pts/1 192.168.56.1 17:18 25:41 0.04s 0.04s -bash
# w
17:48:13 up 39 min, 3 users, load average: 0.58, 0.30, 0.43
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.56.1 17:11 5.00s 0.09s 0.00s w
root pts/1 192.168.56.1 17:18 26:37 0.04s 0.04s -bash
root pts/2 172.17.0.2 17:48 3.00s 0.02s 0.02s -bash
F&Q:
0、如果之前有安装过旧版本的助手,请手动卸载,在安装新的助手
1、我这边更新了助手后还是提示我要更新,狼哥远程我的电脑后,操作步骤如下:
[root@localhost ~]# docker exec -it ebae23bd87c7 /bin/bash
root@ebae23bd87c7:/opt/webterminal# cd common/
root@ebae23bd87c7:/opt/webterminal/common# cat views.py|less
root@ebae23bd87c7:/opt/webterminal/common# cat views.py|less
root@ebae23bd87c7:/opt/webterminal/common# git pull #重新在common目录下pull下
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 6 (delta 5), reused 6 (delta 5), pack-reused 0
Unpacking objects: 100% (6/6), done.
From https://github.com/jimmy201602/webterminal
c9d2c4c..0f59671 master -> origin/master
Updating c9d2c4c..0f59671
Fast-forward
common/views.py | 2 +-
helper/Webterminal Helper.exe | Bin 6763208 -> 6762368 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 helper/Webterminal Helper.exe
root@ebae23bd87c7:/opt/webterminal/common# supervisorctl
web RUNNING pid 63, uptime 0:07:03
webterminalsshserver RUNNING pid 65, uptime 0:07:03
worker1 RUNNING pid 64, uptime 0:07:03
worker2 RUNNING pid 67, uptime 0:07:03
worker3 RUNNING pid 66, uptime 0:07:03
worker4 RUNNING pid 68, uptime 0:07:03
supervisor> restart all #重启主要服务
webterminalsshserver: stopped
worker2: stopped
web: stopped
worker1: stopped
worker4: stopped
worker3: stopped
web: started
worker1: started
webterminalsshserver: started
worker3: started
worker2: started
worker4: started
supervisor>
2, modify the default retrieval tool
Xshell
sure that the machine tool mounting xshell
modify C: \ Program Files (x86) \ config.ini under webterminal helper directory
modifications are as follows: path is the path you need to modify your installation real path
[webterminal ssh helper]
type=xshell
path=C:\Program Files (x86)\NetSarang\Xshell
SecureCRT
sure that the machine has to install SecureCRT tool
to modify C: \ Program Files (x86) \ config.ini under webterminal helper directory
modifications are as follows: path is the path you need to modify your installation real path
[webterminal ssh helper]
type=securecrt
path=C:\Program Files\SecureCRTSecureFX_HH_x86_7.0.0.326\App\VanDyke Clients
3, connect windows server
also configure the credentials
protocol selection rdp
properly configured remote port
input can be remote user and password
to add servers, server groups, user permissions
Click Connect server