running cuFFTXT library over a SSH connection

I am working with CUDA 6:

nvcc --version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2013 NVIDIA Corporation
Built on Thu_Mar_13_11:58:58_PDT_2014
Cuda compilation tools, release 6.0, V6.0.1

Though when I run

result = cufftXtSetGPUs (plan_input, nGPUs, whichGPUs);

I get:

CUFFT_INVALID_DEVICE An invalid GPU index was specified.

Though when I run

int devCount;

I get 2 CUDA Devices.

I run this code over a SSH connection.

Anybody know what is going on, and how I can resolve this?