FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
containerlab/tests/ssh.robot at main · kellerza/containerlab · GitHub
kellerza
containerlab
Repository navigation
Code
Pull requests
6
(6)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
containerlab
/
tests
/
ssh.robot
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (42 loc) · 1.43 KB
Breadcrumbs
containerlab
/
tests
/
ssh.robot
Copy path
File metadata and controls
45 lines (42 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
*** Settings ***
Library
SSHLibrary
*** Keywords ***
Login via SSH with username and password
[Arguments]
...
${
address
}
=
${
None
}
...
${
port
}
=
22
...
${
username
}
=
${
None
}
...
${
password
}
=
${
None
}
# seconds to try and successfully login
...
${
try_for
}
=
4
...
${
conn_timeout
}
=
3
FOR
${
i
}
IN RANGE
${
try_for
}
SSHLibrary.Open Connection
${
address
}
timeout=
${
conn_timeout
}
${
status
}
= Run Keyword And Return Status SSHLibrary.Login
${
username
}
${
password
}
IF
${
status
}
BREAK
Sleep 1s
END
IF $status!=True
Fail Unable to connect to
${
address
}
via SSH in
${
try_for
}
attempts
END
Log Exited the loop.
Login via SSH with public key
[Arguments]
...
${
address
}
=
${
None
}
...
${
port
}
=
22
...
${
username
}
=
${
None
}
...
${
keyfile
}
=~/.ssh/id_rsa
# seconds to try and successfully login
...
${
try_for
}
=
4
...
${
conn_timeout
}
=
3
Log
${
keyfile
}
FOR
${
i
}
IN RANGE
${
try_for
}
SSHLibrary.Open Connection
${
address
}
timeout=
${
conn_timeout
}
${
status
}
= Run Keyword And Return Status SSHLibrary.Login With Public Key
${
username
}
${
keyfile
}
IF
${
status
}
BREAK
Sleep 1s
END
IF $status!=True
Fail Unable to connect to
${
address
}
via SSH in
${
try_for
}
attempts
END
Log Exited the loop.
Back
|
FazBrowse Home
|
New Git URL