1111
1212
1313@ssh_app .command ("command" )
14- def do_command (name : arguments .server_name , ipv6 : options .ipv6 = False ):
14+ def do_command (
15+ name : arguments .server_name , ipv6 : options .ipv6 = False , numeric : options .numeric = False
16+ ):
1517 """
1618 Get the SSH command to connect to a Raspberry Pi server
1719 """
@@ -21,7 +23,10 @@ def do_command(name: arguments.server_name, ipv6: options.ipv6 = False):
2123 raise Exit (1 )
2224 try :
2325 if ipv6 :
24- print (pi .ipv6_ssh_command )
26+ if numeric :
27+ print (pi .ipv6_ssh_command_numeric )
28+ else :
29+ print (pi .ipv6_ssh_command )
2530 else :
2631 print (pi .ipv4_ssh_command )
2732 except HostedPiException as exc :
@@ -34,6 +39,7 @@ def do_config(
3439 names : arguments .server_names = None ,
3540 filter : options .filter_pattern_pi = None ,
3641 ipv6 : options .ipv6 = False ,
42+ numeric : options .numeric = False ,
3743):
3844 """
3945 Get the SSH config to connect to one or more Raspberry Pi servers
@@ -42,7 +48,10 @@ def do_config(
4248 for pi in pis :
4349 try :
4450 if ipv6 :
45- print (pi .ipv6_ssh_config )
51+ if numeric :
52+ print (pi .ipv6_ssh_config_numeric )
53+ else :
54+ print (pi .ipv6_ssh_config )
4655 else :
4756 print (pi .ipv4_ssh_config )
4857 except HostedPiException as exc :
0 commit comments