Skip to content

Commit 731d7ed

Browse files
Add the option to connect to a server using the domain to make it easier when connecting through Akamai Zero Trust Client.
1 parent 184b017 commit 731d7ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

linodecli/plugins/ssh.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ def call(args, context): # pylint: disable=too-many-branches
5050
action="store_true",
5151
help="If given, uses the Linode's SLAAC address for SSH.",
5252
)
53+
parser.add_argument(
54+
"-d",
55+
action="store_true",
56+
help="If given, uses the Lindoe's domain name for SSH",
57+
)
5358

5459
parsed, args = parser.parse_known_args(args)
5560

@@ -147,4 +152,9 @@ def parse_target_address(
147152
if ip.startswith("192.168"):
148153
continue
149154

155+
if getattr(
156+
parsed, "d"
157+
):
158+
ip = ip.replace(".", "-") + ".ip.linodeusercontent.com"
159+
150160
return ip

0 commit comments

Comments
 (0)