Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
7abb35b6
Commit
7abb35b6
authored
Jul 18, 2018
by
wojiushixiaobai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加telnet文档
parent
5c6f871b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
faq.rst
docs/faq.rst
+3
-2
faq_telnet.rst
docs/faq_telnet.rst
+42
-0
No files found.
docs/faq.rst
View file @
7abb35b6
...
@@ -3,8 +3,9 @@ FAQ
...
@@ -3,8 +3,9 @@ FAQ
.. toctree::
.. toctree::
:maxdepth: 1
:maxdepth: 1
Sftp使用说明 <faq_sftp.rst>
Sftp 使用说明 <faq_sftp.rst>
安装过程常见问题 <faq_install.rst>
Telnet 使用说明 <faq_telnet.rst>
安装过程 常见问题 <faq_install.rst>
Linux 资产连接说明 <faq_linux.rst>
Linux 资产连接说明 <faq_linux.rst>
Windows 资产连接说明 <faq_windows.rst>
Windows 资产连接说明 <faq_windows.rst>
二次认证(Google Auth)入口说明 <faq_googleauth.rst>
二次认证(Google Auth)入口说明 <faq_googleauth.rst>
...
...
docs/faq_telnet.rst
0 → 100644
View file @
7abb35b6
Telnet 使用说明
------------------------------
资产的创建与系统用户的创建与ssh大同小异
1. telnet 连不上,提示 No existing session
::
# 这是因为coco无法判断telnet的返回状态导致的,需要修改如下代码
$ vim /opt/coco/coco/connection.py # 第160行
class TelnetConnection:
def __init__(self, asset, system_user, client):
self.client = client
self.asset = asset
self.system_user = system_user
self.sock = None
self.sel = selectors.DefaultSelector()
self.incorrect_pattern = re.compile(
r'incorrect|failed|失败|错误', re.I
)
self.username_pattern = re.compile(
r'login:\s*$|username:\s*$|用户名:\s*$|账\s*号:\s*$', re.I
)
self.password_pattern = re.compile(
r'password:\s*$|passwd:\s*$|密\s*码:\s*$', re.I
)
self.success_pattern = re.compile(
r'Last\s*login|success|成功', re.I
)
# 在 'incorrect|failed|失败|错误|在这里加入你设备登录失败的提示符|可以多个|可以正则匹配'
# 在 'Last\s*login|success|成功|在这里加入你设备登录成功的提示符|可以多个|可以正则匹配'
例:XX路由器 登录成功提示符# 登录失败提示Error
修改 'incorrect|failed|失败|错误|Error'
修改 'Last\s*login|success|成功|#'
# 保存后需要重启coco组件
# 你也可以把你的设备登录成功和登录失败的信息发到jumpserver的项目问题里面,我们会在下个版本更新代码以支持你的设备
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment