| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/compute/__pycache__/ |
Upload File : |
�
��8O � � � d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlm Z ddl
mZ ddlm
Z
dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! dZ"ddd�Z#dZ$d� Z%d� Z&d� Z'd� Z(d � Z) d'd!�Z*ej+ ej, ej# j- � � G d"� d#ej. � � � � � � Z/ej+ ej, ej# j0 ej# j1 � � G d$� d%e/� � � � � � Z2d&� Z3 e3� � e2_4 e3� � e/_4 dS )(z3Implements the command for SSHing into an instance.� )�absolute_import)�division)�unicode_literalsN)�base_classes)�base)�
completers)�flags)�
iap_tunnel)�network_troubleshooter)�scope)� ssh_utils)�user_permission_troubleshooter)�vm_boot_troubleshooter)�vm_status_troubleshooter)�vpc_troubleshooter)�
containers)�ssh)�log)�
properties)�retryz�
Recommendation: To check for possible causes of SSH connectivity issues and get
recommendations, rerun the ssh command with the --troubleshoot option.
{0}
Or, to investigate an IAP tunneling issue:
{1}
�alpha�beta)r r zK
Starting ssh troubleshooting for instance {0} in zone {1}
Start time: {2}
c �4 � | � dd�� � d S )Nz --commandzt A command to run on the virtual machine.
Runs the command on the target instance and then exits.
��help��add_argument��parsers �lib/surface/compute/ssh.py�
AddCommandArgr! C s1 � �����
� � � � � � � c �� � | � ddd�� � | � dt j dd�� � | � d t j d
d�� � d
S )z>Additional flags and positional args to be passed to *ssh(1)*.z
--ssh-flag�appendaA Additional flags to be passed to *ssh(1)*. It is recommended that flags
be passed using an assignment operator and quotes. Example:
$ {command} example-instance --zone=us-central1-a --ssh-flag="-vvv" --ssh-flag="-L 80:localhost:80"
This flag will replace occurences of ``%USER%'', ``%INSTANCE%'', and
``%INTERNAL%'' with their dereferenced values. For example, passing
``80:%INSTANCE%:80'' into the flag is equivalent to passing
``80:162.222.181.197:80'' to *ssh(1)* if the external IP address of
'example-instance' is 162.222.181.197.
If connecting to the instance's external IP, then ``%INSTANCE%'' is
replaced with that, otherwise it is replaced with the internal IP.
``%INTERNAL%'' is always replaced with the internal interface of the
instance.
��actionr � user_hostz[USER@]INSTANCEa8 Specifies the instance to SSH into.
``USER'' specifies the username with which to SSH. If omitted,
the user login name is used. If using OS Login, USER will be replaced
by the OS Login user.
``INSTANCE'' specifies the name of the virtual machine instance to SSH
into.
)� completer�metavarr �ssh_argszW Flags and positionals passed to the underlying ssh implementation.
z\ $ {command} example-instance --zone=us-central1-a -- -vvv -L 80:%INSTANCE%:80
)�nargsr �exampleN)r r �InstancesCompleter�argparse� REMAINDERr s r �
AddSSHArgsr0 M s� � �����
�
� � � � �* �����-��
� �
�
�
� �������
�
� � � � � r"