Previous: Step 2 - Share your SSH public key with us
Next: Step 4 - Create first simple BDDF file
Once you have received a confirmation from us that your public key is imported and SFTP configured (with connection details) it’s time to test your connection.
Below you can find three ways to do this, pick the one that suits you the most:
- Using open-source FTP client
- Using command line interface
- Using python script
Note that we will share two separate usernames for real-time and historical data delivery - it doesn’t make a difference which one you use to test the connection, if it works for one, it should work for the other as well.
Open-source FTP client
✅ Step 1: Download and install FileZilla
- Go to the official FileZilla website
- Click on Download FileZilla Client (not Server)
- Choose the version for your operating system (Windows/macOS/Linux)
- Download the standard version (you don’t need Pro unless you require cloud access features)
- Run the installer:
- on Windows, run the .exe file.
- on macOS, open the .dmg and drag FileZilla into the Applications folder
- on Linux, use your package manager or download the .tar.bz2 archive.
✅ Step 2: Convert SSH private key to PPK (if using Windows)
FileZilla on Windows needs a .ppk key (PuTTY format), not OpenSSH by default but we’ll help you convert it.
Please note this is about your private key, not the public key that you have shared with us previously.
If you don’t have your SSH key pair created, please go here and follow instructions.
- Download PuTTYgen
- Open PuTTYgen.
- Click Load, and in the file browser, select:
- File type: All Files
- Navigate to C:\Users\yourname.ssh\id_ed25519 (or wherever your private key is)
- Click Save private key to export it as a .ppk file.
📝 You can now use this .ppk file in FileZilla.
- Open FileZilla
- Go to File → Site Manager
- Click New Site and give it a name (e.g., RavenPack SFTP)
- Set the following fields:
- Protocol: SFTP - SSH File Transfer Protocol
- Host: use the hostname we provided to you (most likely sftp.prod.nvirginia.common.ravenpack.com)
- Port: leave empty or use 22 (default SFTP port)
- Logon Type: key file
- User: Your username (provided by RavenPack - use either real-time or historical data username, both should work equally)
- Key file:
— On Windows: browse and select the .ppk file
— On macOS/Linux: browse and select your private key (e.g., ~/.ssh/id_ed25519)
- Click Connect
✅ Step 4: Verify the connection
If successful, you’ll see the remote directory structure on the right side of FileZilla. Congratulations!
Command line interface
Testing by using command line interface could be a bit simpler because you don’t need to install any additional software. To do this, follow these steps:
✅ Step 1: Test the connection
- Open Terminal
- Run the following command:
sftp -i ~/.ssh/id_ed25519 your_username@your.sftp.host
- replace your_username with the username provided to you (use either real-time or historical data username, both should work equally)
- replace your.sftp.host with the actual SFTP server address (most likely sftp.prod.nvirginia.common.ravenpack.com)
💡 On some systems, sftp uses ssh underneath and may not accept the -i flag. If that’s the case, use this workaround:
ssh -i ~/.ssh/id_ed25519 your_username@your.sftp.host
Then try sftp again, assuming ~/.ssh/config is properly configured.
✅ Step 2: Add an SSH config entry
To simplify future connections, add the following to your ~/.ssh/config:
Host ravenpack-sftp
HostName your.sftp.host
User your_username
IdentityFile ~/.ssh/id_ed25519
Now you can just run:
✅ Step 3: Use the FTP
Once connected via SFTP, you can run interactive commands:
View remote files:
Upload a file:
Downaload a file:
Exit:
Python script
Here’s a Python script that automates the process of testing an SFTP connection using SSH key authentication with the help of the paramiko library.
✅ Step 1: Install paramiko library
Install paramiko library, if you haven’t already:
✅ Step 2: Save the script file
Save the code from the snipped below in a file named sftp_text.py:
import paramiko
import os
# === Configuration ===
HOST = "your.sftp.host" # Replace with your SFTP server
PORT = 22 # Default SFTP port
USERNAME = "your_username" # Replace with your username
PRIVATE_KEY_PATH = os.path.expanduser("~/.ssh/id_ed25519") # Path to your private key
REMOTE_TEST_FILE = "test_remote.txt"
LOCAL_TEST_FILE = "test_local.txt"
# === Connect and Perform SFTP Actions ===
def sftp_connect():
try:
# Load private key
key = paramiko.Ed25519Key(filename=PRIVATE_KEY_PATH)
# Create Transport and SFTP client
transport = paramiko.Transport((HOST, PORT))
transport.connect(username=USERNAME, pkey=key)
sftp = paramiko.SFTPClient.from_transport(transport)
print(f"✅ Connected to {HOST} via SFTP")
# List remote directory
print("📁 Remote directory listing:")
for filename in sftp.listdir():
print(" -", filename)
# OPTIONAL: Upload a test file
if os.path.exists(LOCAL_TEST_FILE):
print(f"⬆️ Uploading '{LOCAL_TEST_FILE}'...")
sftp.put(LOCAL_TEST_FILE, REMOTE_TEST_FILE)
print(f"✅ Uploaded as '{REMOTE_TEST_FILE}'")
# OPTIONAL: Download the same file back
print(f"⬇️ Downloading '{REMOTE_TEST_FILE}' to 'downloaded_{REMOTE_TEST_FILE}'...")
sftp.get(REMOTE_TEST_FILE, f"downloaded_{REMOTE_TEST_FILE}")
print(f"✅ Downloaded successfully")
# Close connection
sftp.close()
transport.close()
print("🔌 Disconnected.")
except FileNotFoundError:
print(f"❌ Private key not found at {PRIVATE_KEY_PATH}")
except paramiko.AuthenticationException:
print("❌ Authentication failed. Check your SSH key and username.")
except Exception as e:
print(f"❌ Connection failed: {e}")
# === Run Script ===
if __name__ == "__main__":
sftp_connect()
✅ Step 3: Edit the configuration
Edit the configuration at the top of the script:
- HOST (most likely sftp.prod.nvirginia.common.ravenpack.com)
- USERNAME (use the username we provided to you - use either real-time or historical data username, both should work equally)
- PRIVATE_KEY_PATH (most likely you will just keep the default one)
✅ Step 4: Run the script
Just run the script and, if everything goes well, you will see the status message confirming the connection was established successfully:
Now that you are able to connect to the FTP, it’s time to prepare the data! Let’s get started!
Next: Step 4 - Create first simple BDDF file