Java教程

Web SSH 客户端工具

本文主要是介绍Web SSH 客户端工具,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

webssh简介
如何在浏览器web页面登录我们的linux机器,这个工具是使用Python开发

官网:https://pypi.org/project/webssh/

webssh这个工具可以干啥??

在linux机器上安装python环境,并且使用命令pip3 install webssh,装上这个模块

功能
支持SSH密码验证,包括空密码。
支持SSH公钥认证,包括DSA RSA ECDSA Ed25519密钥。
支持加密密钥。
支持两要素身份验证(基于时间的一次性密码)
支持全屏终端。
终端窗口可调整大小。
自动检测ssh服务器的默认编码。
现代浏览器支持Chrome,Firefox,Safari,Edge,Opera。

1,安装
pip3 install webssh

[root@centos8 ~]# pip3 install webssh  
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting webssh
  Downloading https://files.pythonhosted.org/packages/cf/62/70ec57c40f1eb6d789a19f7af3075d14ad09cf283482d6ae6acfc75be1ea/webssh-1.5.3.tar.gz (182kB)
    100% |████████████████████████████████| 184kB 38kB/s 
Collecting tornado>=4.5.0 (from webssh)
  Downloading https://files.pythonhosted.org/packages/01/d1/8750ad20cbcefb499bb8b405e243f83c2c89f78d139e6f8c8d800640f554/tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl (427kB)
    100% |████████████████████████████████| 430kB 24kB/s 
Requirement already satisfied: paramiko>=2.3.1 in /usr/lib/python3.6/site-packages (from webssh)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib64/python3.6/site-packages (from paramiko>=2.3.1->webssh)
Requirement already satisfied: cryptography>=1.5 in /usr/lib64/python3.6/site-packages (from paramiko>=2.3.1->webssh)
Requirement already satisfied: pynacl>=1.0.1 in /usr/lib64/python3.6/site-packages (from paramiko>=2.3.1->webssh)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python3.6/site-packages (from paramiko>=2.3.1->webssh)
Requirement already satisfied: cffi>=1.1 in /usr/lib64/python3.6/site-packages (from bcrypt>=3.1.3->paramiko>=2.3.1->webssh)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3.6/site-packages (from bcrypt>=3.1.3->paramiko>=2.3.1->webssh)
Requirement already satisfied: idna>=2.1 in /usr/lib/python3.6/site-packages (from cryptography>=1.5->paramiko>=2.3.1->webssh)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python3.6/site-packages (from cryptography>=1.5->paramiko>=2.3.1->webssh)
Requirement already satisfied: pycparser in /usr/lib/python3.6/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko>=2.3.1->webssh)
Installing collected packages: tornado, webssh
  Running setup.py install for webssh ... done
Successfully installed tornado-6.1 webssh-1.5.3

2,启动

#直接运行wssh,使用默认8888端口
wssh

 通过绑定IP地址和端口启动
wssh --address='192.168.43.150' --port=8888
wssh --address='0.0.0.0' --port=8888

 通过绑定IP地址和端口启动,只允许本地地址访问
wssh --address='127.0.0.1' --port=8888
[root@centos8 ~]# wssh --address='192.168.43.150' --port=8888 &
[1] 1393
[root@centos8 ~]# [I 210414 17:05:35 settings:125] WarningPolicy
[I 210414 17:05:35 main:39] Listening on 192.168.43.150:8888 (http)

3,打开web使用
http://192.168.43.150:8888/
在这里插入图片描述
在这里插入图片描述

这篇关于Web SSH 客户端工具的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!