Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
96f4d71d
authored
Sep 04, 2014
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: more string modification
parent
9334dd45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
dist/cloud_connect_from_linux.py
+7
-2
src/python/cloud_connect_from_linux.py
+7
-2
No files found.
dist/cloud_connect_from_linux.py
View file @
96f4d71d
...
@@ -26,8 +26,13 @@ def connect(vm):
...
@@ -26,8 +26,13 @@ def connect(vm):
vm.password -- Password used for the connection
vm.password -- Password used for the connection
"""
"""
if
vm
.
protocol
==
"SSH"
:
if
vm
.
protocol
==
"SSH"
:
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
command
=
(
"sshpass -p
%(password)
s ssh -p
%(port)
s"
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
" -o StrictHostKeyChecking=no
%(user)
s@
%(host)
s"
%
{
'password'
:
vm
.
password
,
'port'
:
vm
.
port
,
'user'
:
vm
.
user
,
'host'
:
vm
.
host
})
subprocess
.
call
(
command
,
shell
=
True
)
subprocess
.
call
(
command
,
shell
=
True
)
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
...
...
src/python/cloud_connect_from_linux.py
View file @
96f4d71d
...
@@ -26,8 +26,13 @@ def connect(vm):
...
@@ -26,8 +26,13 @@ def connect(vm):
vm.password -- Password used for the connection
vm.password -- Password used for the connection
"""
"""
if
vm
.
protocol
==
"SSH"
:
if
vm
.
protocol
==
"SSH"
:
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
command
=
(
"sshpass -p
%(password)
s ssh -p
%(port)
s"
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
" -o StrictHostKeyChecking=no
%(user)
s@
%(host)
s"
%
{
'password'
:
vm
.
password
,
'port'
:
vm
.
port
,
'user'
:
vm
.
user
,
'host'
:
vm
.
host
})
subprocess
.
call
(
command
,
shell
=
True
)
subprocess
.
call
(
command
,
shell
=
True
)
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
...
...
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