SSH Key with Google cloud
We can create 2 type of SSH key for google
1) which connect to all instance
2) which connect to particular 1 instance
1) Generate SSH key via
a) Go to a place where you want to generate ssh key
b) ssh-keygen -t rsa -b 4096 -C keyName
Note keyName is your ssh key you can replace with any other
c) Provide path and name of ssh
d) Copy the content of keyName.pub file
e) Visit your console.google.com
Go to compute engine -> Setting -> MetaData
Add the key
2) Create a firewall rule or edit the existing ssh firewall rule with source ip with your IP if you want to secure it
3) Create an instance
4)After that got for edit
5) Option want for the person for this particular instance then click SSH Block
Final in your terminal
sudo ssh -i keyName keyName@IP_ADDRESS
Comments
Post a Comment