You can directly download module or theme from your ssh or putty.
1) Go to modules directory of your drupal installation. E.g:-
cd sites/all/modules
2). Download archive using wget command:
wget http://ftp.drupal.org/files/projects/image-6.x-1.0-beta5.tar.gz
3). Uncompress archive:
tar zxvf image-6.x-1.0-beta5.tar.gz
4). Delete/Remove archive:
rm -rf image-6.x-1.0-beta5.tar.gz
5)Confirm your module is there:-
ls -a
Note: the module image-6.x-1.0-beta5.tar.gz is taken here as example please check the current
version and or substitute with your preferred module. You can do same for themes also.