Gcloud: Difference between revisions
Jump to navigation
Jump to search
| Line 14: | Line 14: | ||
<syntaxhighlight lang="sh"> | <syntaxhighlight lang="sh"> | ||
# Setup | |||
gcloud compute config-ssh \ | gcloud compute config-ssh \ | ||
--ssh-config-file=~/.ssh/config.09-xxx/config \ | --ssh-config-file=~/.ssh/config.09-xxx/config \ | ||
--ssh-key-file=~/.ssh/config.09-xxx/private_key.pem | --ssh-key-file=~/.ssh/config.09-xxx/private_key.pem | ||
# Remove | |||
gcloud compute config-ssh \ | gcloud compute config-ssh \ | ||
--ssh-config-file=~/.ssh/config.09-xxx/config \ | --ssh-config-file=~/.ssh/config.09-xxx/config \ | ||
Revision as of 10:03, 12 November 2025
SSH Login
- Check Firewall
- Navigator VPC Network -> Firewall
- Check VPC firewall rules
- Set default region
- SSH
gcloud compute ssh <vm-instance-name>
Config default SSH Key
A new key pair will be generated, using existed key is not recommended.
The existed private key would be overwritten.
# Setup
gcloud compute config-ssh \
--ssh-config-file=~/.ssh/config.09-xxx/config \
--ssh-key-file=~/.ssh/config.09-xxx/private_key.pem
# Remove
gcloud compute config-ssh \
--ssh-config-file=~/.ssh/config.09-xxx/config \
--ssh-key-file=~/.ssh/config.09-xxx/private_key.pem \
--remove