Network SSH and ftp

Dear all,

I am a new ruby programer and i would your help to apply the following
in ruby.

In order to download my files from my ftp server (It doesnt support
rsync) i need to do the following:

ssh -nNTf -l $router_user -D $port $wide_ip_addres (open SSH)

socksify wget --user=$gps_user
–password=$password
-T 10
–tries=3
–dont-remove-listing
–no-host-directories
–directory-prefix=$root_dir/
ftp://$local_ip_addres
(use socksify and a local ip addres).

I saw that a person could install ruby socksify package, but i dont
really know how to defind this all. In general i have a shell script
that combine my ruby program and the ssh, but i would like to know how
could i write it all in ruby.

Thanks