How to Connect FileZilla with Google Cloud

How To Register A Domain Name
How To Register A Domain Name
July 8, 2022
Show all
membuat-ssh-key
How to connect your Google Cloud with SSH Key via SFTP (Filezilla/WinSCP). For this, we have explained below in a very easy way. First, we have to generate SSH Key. Second, we have to convert SSH Key files into public and private convert files. Third, then connect to SFTP (Filezilla/WinSCP) by following the steps follow one by one it’s quite easy.
Below you will find a step-by-step guide:-
Creating SSH Keys (Command Line)
Public key authentication (SSH Key) is a more secure alternative to password authentication that allows users to avoid entering or storing a password, or sending it over the network. Public key authentication uses the client computer to generate the key pair (a public key and a private key). The public key is then provided to the remote computer’s administrator to be installed on that machine.
  1. Create a .ssh directory in your home directory if it does not already exist:
    $ mkdir /Users/username/.ssh 

    or

    $ mkdir /home/username/.ssh

    Go to the .ssh folder:

    $ cd /Users/username/.ssh
    $ cd /home/username/.ssh
  2. Run ssh-keygen to generate an SSH key-pair.

    Run the following command in the .ssh folder to create a key pair. For key_type, specify either RSA (rsa) or ECDSA (ecdsa). At the prompt for the key-pairs filename, press ENTER to use the default name id_rsa or id_ecdsa, or enter a different name, such as your username. For a passphrase, either enter a password or press return twice to leave it blank:

    $ ssh-keygen -t key_type
  3. Retrieve the public key file.

    The key pair is generated to your home directory’s .ssh folder. For example, assuming you generated the key with the default name id_rsa:

    /Users/username/.ssh/id_rsa.pub

    or

    /home/username/.ssh/id_rsa.pub

    Provide the public key file (for example, id_rsa.pub) to your server administrator so that it can be set up for your server connection.

  4. Start a transfer using public key authentication with the ascp command.

    To transfer files using public key authentication on the command line, use the option -i private_key_file. For example:

    $ ascp -T -l 10M -m 1M  -i ~/.ssh/id_rsa  my_file.txt  user_name@10.0.0.2:/space

    In this example, you connect to the server (10.0.0.2, directory /space) with the user account user_name and the private key ~/.ssh/id_rsa.

Or Another way

$ ssh-keygen -t rsa -f ~/.ssh/ssh_file_name -C user_name

$ sudo -s ssh -i ~/.ssh/ssh_file_name  user_name@100.1.10.101 (Server IP Address)

How to convert private and public keys from SSH key

Steps to convert private and public keys from SSH key

Tool Used:

  • Puttygen (PuTTY Key Generator)
  • WinSCP

Steps to perform:

  1. Open PuTTY Key Generator.
  2. Load SSH key into software, your private key (*.ppk file).
  3. Copy your public key data from the “Public key for pasting into OpenSSH authorized_keys file” section of the PuTTY Key Generator and paste the key data to the “authorized_keys” file (using notepad) if you want to use it
  4. Save private and public keys into the desired folder.
How to connect Filezilla using a Private key

 Steps to connect Filezilla using the private key

  1. Open filezilla software.
  2. Click On File Menu -> Open Site Manager or press (CTRL + S)
  3. Press “New Site” and enter Sitename here.
  4. Select protocol as SFTP/SSH (SSH File Transfer Protocol).
  5. Enter Host Name or Server IP Adress (System) in Host.
  6. Enter the port number, if using the specific port on the server otherwise leave it.
  7. Select login type to KEY File.
  8. Enter user_name of ssh file.
  9. Browse and Upload the private key.
  10. Hit connect to connect FileZilla with the server.

1 Comment

  1. Ravi Ranjan says:

    Nice blog, really help us

Leave a Reply

Your email address will not be published. Required fields are marked *

× How can I help you?
//]]>