sftp icon

SFTP Access

Version: latest

Logging in with OpenSSH Command Line SFTP Client in Windows Systems

In this section we’ll look into how we can login to the AS2 Gateway SFTP server from a Windows based OpenSSH command line client. If the sftp command is not available in your cmd, please install OpenSSH before proceeding further.

  1. First download the private key file from the SFTP view.

  2. Then before using the login command, we first have to set correct permissions to the private key file. Please take a look at this Super User thread of setting correct permissions to your private key file.

    Note that if you do not set correct permission to the private key file, you’ll get an error message similar fo following when you try to run the SFTP login command.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Permissions 0777 for 'id_rsa_rajind' are too open.
    It is required that your private key files are NOT accessible by others.
    This private key will be ignored.
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Permissions 0777 for 'id_rsa_rajind' are too open.
    It is required that your private key files are NOT accessible by others.
    This private key will be ignored.
    Load key "id_rsa_rajind": bad permissions
    rajind@sftp.as2gateway.com: Permission denied (publickey).
    Connection closed
  3. Now you can run the SFTP login command as follows. Please replace <private_key_file with the your private key file name with path and replace <user_name> with the SFTP username (the username which was used in the form when setting up SFTP) when executing the below command.

    Note that at the first time when you run the sftp login command, you will be prompted for the private key passphrase. Please provide the password which you used in the form when setting up SFTP as the passphrase.

    sftp -o Port=9193 -o IdentityFile=<private_key_file> <user_name>@sftp.as2gateway.com
In this topic
In this topic