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
0d25a8f5
Commit
0d25a8f5
authored
Sep 29, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use thread replace process
parent
b4c64991
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
ssh_server.py
terminal/ssh_server.py
+3
-8
No files found.
terminal/ssh_server.py
View file @
0d25a8f5
...
@@ -92,7 +92,6 @@ class SSHServer(paramiko.ServerInterface):
...
@@ -92,7 +92,6 @@ class SSHServer(paramiko.ServerInterface):
})
})
return
paramiko
.
AUTH_SUCCESSFUL
return
paramiko
.
AUTH_SUCCESSFUL
else
:
else
:
self
.
client
.
close
()
logger
.
info
(
'Authentication password failed for
%(username)
s from
%(host)
s port
%(port)
s '
%
{
logger
.
info
(
'Authentication password failed for
%(username)
s from
%(host)
s port
%(port)
s '
%
{
'username'
:
username
,
'username'
:
username
,
'host'
:
self
.
addr
[
0
],
'host'
:
self
.
addr
[
0
],
...
@@ -275,10 +274,6 @@ class JumpServer:
...
@@ -275,10 +274,6 @@ class JumpServer:
'host'
:
addr
[
0
],
'host'
:
addr
[
0
],
'port'
:
addr
[
1
],
'port'
:
addr
[
1
],
})
})
raise
IndexError
dir
(
client
)
client
.
close
()
return
False
try
:
try
:
client_channel
=
self
.
get_client_channel
(
client
,
addr
)
client_channel
=
self
.
get_client_channel
(
client
,
addr
)
...
@@ -360,9 +355,9 @@ class JumpServer:
...
@@ -360,9 +355,9 @@ class JumpServer:
while
True
:
while
True
:
try
:
try
:
client
,
addr
=
sock
.
accept
()
client
,
addr
=
sock
.
accept
()
process
=
Process
(
target
=
self
.
handle_ssh_request
,
args
=
(
client
,
addr
))
thread
=
threading
.
Thread
(
target
=
self
.
handle_ssh_request
,
args
=
(
client
,
addr
))
process
.
daemon
=
True
thread
.
daemon
=
True
process
.
start
()
thread
.
start
()
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
'Bind failed: '
+
str
(
e
))
logger
.
error
(
'Bind failed: '
+
str
(
e
))
traceback
.
print_exc
()
traceback
.
print_exc
()
...
...
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