Setting Up SFTP Access

Learn to set up secure SFTP access with Alby by generating a key pair, and connecting to the SFTP server with credentials.

Create .ssh Directory

  1. Open a terminal and navigate to your home directory:
    cd ~
  2. Check if the .ssh folder already exists
    ls -a
  3. If it doesn't exists, create it:
    mkdir .ssh

Generate Public Key

  1. Running the following command:
    ssh-keygen
  2. In the .ssh folder, you will find id_rsa (private_key) and id_rsa.pub (public_key).
  3. Send the contents of id_rsa.pub to Alby.

Send Data to SFTP

  1. Once Alby creates the SFTP user, you can send data.
  2. Alby will provide you with the username and SFTP endpoint.
  3. Log into SFTP from the terminal:
    sftp -i ~/.ssh/id_rsa sftp_user@service_endpoint

    Replace sftp_user with the provided username and service_endpoint with the provided endpoint. For example:

     sftp -i ~/.ssh/id_rsa alby@sftp.alby.com
  4. After connecting, you can send data to SFTP using the put command. For example:
    put /Users/alby/Desktop/Work/Repo/alby.json

    Replace the path with the full path to the file you want to send.

These steps will help you create a public key for SFTP and send data to the SFTP server.