JMeter SFTP Request

In my previous post, we have seen how to utilize an external groovy script to make some FTP Requests.

Now there is slight change in the requirement. FTP got changed to SFTP, which means it’s more secure.

We can’t use our FTP Samplers to create a SFTP request to authenticate using SSH.

Originally I built the SSH FTP Sampler using the instructions in HOW TO BUILD SSH SFTP SAMPLER FOR JMETER? (BY IMPLEMENTS TESTBEAN)

We have to check out the source code from and then generating the target by building it using maven.

Also we need Jsch. JSch is a java implementation of SSH. This allows us to connect to an FTP server for file transfer.

But just to make this process simpler, I checked-in the two jar files required for creating SSH FTP request here –

This contains two jar files.

  1. jmeter-ssh-sampler-1.0.2-SNAPSHOT.jar
  2. jsch-0.1.53.jar

To install this in Jmeter,

  1. Copy the jmeter-ssh-sampler-1.0.2-SNAPSHOT.jar to the “Jmeter/Lib/ext” directory.
  2. Copy the “jsch-0.1.53.jar” to the “Jmeter/Lib” directory
  3. Restart Jmeter.

I have also added a sample test to list of the directory contents in a Public SFTP Server –

Open this JMX file in your JMeter and run it to see this in action.

2 thoughts on “JMeter SFTP Request

  1. lekha


    First of all thanks for the great plug-in. We used it but now all the sessions opened by during the test is not killed. is this the expected behavior. Can we have some work around to kill the session once the file is closed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s