Gcloud: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 10: Line 10:


<syntaxhighlight lang="sh">
<syntaxhighlight lang="sh">
gcloud compute config-ssh --ssh-config-file=~/.ssh/config.05-hix/config --remove
gcloud compute config-ssh \
gcloud compute config-ssh --ssh-config-file=~/.ssh/config.05-hix/config
  --ssh-config-file=~/.ssh/config.09-xxx/config \
  --ssh-key-file=~/.ssh/config.09-xxx/private_key.pem
 
gcloud compute config-ssh \
  --ssh-config-file=~/.ssh/config.09-xxx/config \
  --ssh-key-file=~/.ssh/config.09-xxx/private_key.pem \
  --remove
</syntaxhighlight>
</syntaxhighlight>

Revision as of 07:32, 12 November 2025

SSH Login

  • Check Firewall
    1. Navigator VPC Network -> Firewall
    2. Check VPC firewall rules
  • Set default region
  • SSH
    gcloud compute ssh <vm-instance-name>
    

Config default SSH Key

gcloud compute config-ssh \
  --ssh-config-file=~/.ssh/config.09-xxx/config \
  --ssh-key-file=~/.ssh/config.09-xxx/private_key.pem

gcloud compute config-ssh \
  --ssh-config-file=~/.ssh/config.09-xxx/config \
  --ssh-key-file=~/.ssh/config.09-xxx/private_key.pem \
  --remove