• Welcome to Kali Linux Tutorial

    Kali Linux is a Linux distribution designed for digital forensics and penetration testing.

  • Offensive vs Defensive

    Offensive Security is an American international company working in information security, penetration testing and digital forensics.

  • Network Security

    Network security is the protection of the underlying networking infrastructure from unauthorized access, misuse, or theft.

  • VPN (Virtual Private Network)

    A virtual private network, or VPN, is an encrypted connection over the Internet from a device to a network.

  • What is Artificial intelligence?

    Artificial intelligence is a technology that allows you to generate, classify, and perform tasks like image analysis and speech recognition.

Generate SSH Key Pair Access to Google Cloud

 

Step #1: Generate Your SSH Key Pair

Use the ssh-keygen command to create a new key pair. Replace [KEY_FILENAME] with a descriptive name and [USERNAME] with the desired login user (usually your Linux username).

ssh-keygen -t rsa -f ~/.ssh/[KEY_FILENAME] -C [USERNAME]

Example:

ssh-keygen -t rsa -f ~/.ssh/ssh-key-pair -C ologucci888

Step #2: Navigate to the Key Directory

Change directory to your local .ssh folder where the new keys were created.

cd ~/.ssh

Step #3: Restrict Private Key Permissions

For security, the private key file must have restrictive permissions, allowing only the owner to read it.

chmod 400 [KEY_FILENAME]

Example:

chmod 400 ssh-key-pair

Step #4: Display the Public Key 

View the content of the public key (the file ending in .pub). You will need to copy this entire output.

cat [KEY_FILENAME].pub

Example:

cat ssh-key-pair.pub

Step #5: Upload Public Key to Google Cloud Metadata

Log into your Google Cloud console and paste the entire output from the previous step into the SSH Keys section of the Compute Engine Metadata.

Metadata Link: https://console.cloud.google.com/compute/metadata?project=n8n-train-468804&scopeTab=projectMetadata&resourceTab=sshkeys

Final Step: Connect to Your VM Instance

Once the key is saved in the metadata, you can connect from your local machine using the private key (-i flag), your user ID, and the external IP address.

ssh -i YOUR_PRIVATE_KEY YOUR_USER@YOUR_EXTERNAL_IP

Example:

ssh -i ssh-key-pair ologucci888@34.169.59.15
Share:

Basic Concept You need to know in Kali Linux.


There is a scenario to try hacking on virtual machine. Please look closely on my diagram for hacking methods. Note: about this guideline are using in training purpose.

Share:

Welcome to Push the Script Webpage

 Welcome to Push the Script Webpage!



Share:

Follow Us on Facebook

Powered by Blogger.

Feature Posts

Generate SSH Key Pair Access to Google Cloud

Main Tags