Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
16c758ae
Commit
16c758ae
authored
Jul 15, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: Drop IP check when connectiong via SSH and pubkey
parent
ae05420c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
ci-scripts/sshconnection.py
ci-scripts/sshconnection.py
+5
-10
No files found.
ci-scripts/sshconnection.py
View file @
16c758ae
...
...
@@ -84,16 +84,11 @@ class SSHConnection():
else
:
logging
.
debug
(
'self.sshresponse = '
+
str
(
self
.
sshresponse
))
elif
self
.
sshresponse
==
2
:
# Checking if we are really on the remote client defined by its IP address
self
.
ssh
.
sendline
(
'stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "'
)
self
.
sshresponse
=
self
.
ssh
.
expect
([
ipaddress
,
pexpect
.
EOF
,
pexpect
.
TIMEOUT
])
if
self
.
sshresponse
==
0
:
count
=
10
connect_status
=
True
# this expect seems to be necessary to advance the read buffer until the prompt, or getBefore() will not return the last command
self
.
sshresponse
=
self
.
ssh
.
expect
([
prompt
])
else
:
logging
.
error
(
'logged in to '
+
ipaddress
+
' without password but IP is not found via ifconfig on remote host, aborting'
)
# We directly ended up on the remote server because of pubkey auth
count
=
10
connect_status
=
True
# this expect() seems to be necessary to advance the read buffer until the prompt, or getBefore() will not return the last command
self
.
sshresponse
=
self
.
ssh
.
expect
([
prompt
])
else
:
# debug output
logging
.
debug
(
str
(
self
.
ssh
.
before
))
...
...
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